Do not follow this link

~jmaibaum/sr.ht-quadlet

SourceHut containers for local development utilising Podman Quadlet
Add paste.sr.ht
Add .containerignore

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~jmaibaum/sr.ht-quadlet
read/write
git@git.sr.ht:~jmaibaum/sr.ht-quadlet

You can also use your local clone with git send-email.

#sr.ht-quadlet

Caution: This is still work-in-progress, and requires many manual steps. If you feel like helping out, I would be delighted to receive a patch!

Based on, and inspired by Simon Ser's now unmaintained sr.ht-container-compose, this repository contains Podman Quadlet systemd units to build and run a local container-based deployment of Sourcehut's services, usable for local debugging and development.

I started this project during a work-free week, because I am using Fedora Silverblue, (which comes with Podman, and Podman comes with the Quadlet systemd-generator) and trying to set up docker-compose (or podman-compose) simply didn't work out for me.

#Requirements

  • Podman >= 5.2.0 -- which added support for .build units
  • systemd -- I tested this on Fedora Silverblue 40, but I assume that any contemporary systemd-based distro should be fine -- YMMV.

#Installation and Usage

The following is a work-in-progress guide to install manually. It shall be replaced by simple make targets once I have found time to write a Makefile (or after you have sent a patch?).

  1. Symlink all Containerfiles*, the config, pgp, and git-sshd directories to $XDG_CONFIG_DIR/containers/systemd/.

  2. Check out all Sourcehut git repositories in $XDG_CONFIG_DIR/containers/systemd/. Symlinks do not work here due to Containerfiles not allowing symlinks as sources for ADD or COPY instructions.

  3. Run systemctl --user daemon-reload to let Quadlet generate the systemd services.

  4. Run systemctl --user start srht-<service>.service in order to build and run your desired Sourcehut services. On first run, this will download dependencies, and build the actual containers from the git checkouts.

In case something doesn't yet work on first try, it's likely due to missing or wrong dependencies between the services. Check journalctl --user -xeu <service-that-failed> for hints. It could work on a second try, if not, feel free to write an e-mail or, better yet, send a patch.

Do not follow this link