From 0a20e3d19c00a75e56fde9b143093c504a9102c7 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Wed, 25 Oct 2023 10:41:21 -0500 Subject: [PATCH] Add systemd .container files --- systemd/README.md | 16 ++++++++++++++++ systemd/gothub.container | 22 ++++++++++++++++++++++ systemd/librey.container | 15 +++++++++++++++ systemd/scribe.container | 17 +++++++++++++++++ systemd/shaarli.container | 14 ++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 systemd/README.md create mode 100644 systemd/gothub.container create mode 100644 systemd/librey.container create mode 100644 systemd/scribe.container create mode 100644 systemd/shaarli.container diff --git a/systemd/README.md b/systemd/README.md new file mode 100644 index 0000000..420b0e6 --- /dev/null +++ b/systemd/README.md @@ -0,0 +1,16 @@ +# systemd + +These .container files are for use with systemd. + +See the following documentation: +- [Make systemd better for Podman with Quadlet](https://www.redhat.com/sysadmin/quadlet-podman) +- [podman-systemd.unit](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html) + +## Usage + +``` shell +mv systemd ~/.config/containers/ +systemctl --user daemon-reload +sudo loginctl enable-linger $USER +systemctl --user start gothub.service +``` diff --git a/systemd/gothub.container b/systemd/gothub.container new file mode 100644 index 0000000..ad72d67 --- /dev/null +++ b/systemd/gothub.container @@ -0,0 +1,22 @@ +[Unit] +Description=GotHub container +After=network-online.target + +[Container] +ContainerName=gothub +Image=codeberg.org/gothub/gothub:latest +PublishPort=10482:3000 +Environment=DOCKER=true +Environment=GOTHUB_SETUP_COMPLETE=true +Environment=GOTHUB_PROXYING_ENABLED=true +Environment=GOTHUB_IP_LOGGED=false +Environment=GOTHUB_REQUEST_URL_LOGGED=false +Environment=GOTHUB_USER_AGENT_LOGGED=false +Environment=GOTHUB_DIAGNOSTIC_INFO_LOGGED=false +Environment=GOTHUB_INSTANCE_PRIVACY_POLICY="" +Environment=GOTHUB_INSTANCE_COUNTRY=US +Environment=GOTHUB_INSTANCE_PROVIDER=Linode +Environment=GOTHUB_INSTANCE_CLOUDFLARE=false + +[Install] +WantedBy=multi-user.target default.target diff --git a/systemd/librey.container b/systemd/librey.container new file mode 100644 index 0000000..bc6372e --- /dev/null +++ b/systemd/librey.container @@ -0,0 +1,15 @@ +[Unit] +Description=LibreY container +After=network-online.target + +[Container] +ContainerName=librey +Image=ghcr.io/ahwxorg/librey:latest +PublishPort=10484:8080 +EnvironmentFile=/home/jas/LibreY/env +Volume=/home/jas/LibreY/nginx_logs:/var/log/nginx:Z +Volume=/home/jas/LibreY/php_logs:/var/log/php7:Z + +[Install] +WantedBy=multi-user.target + diff --git a/systemd/scribe.container b/systemd/scribe.container new file mode 100644 index 0000000..a033d17 --- /dev/null +++ b/systemd/scribe.container @@ -0,0 +1,17 @@ +[Unit] +Description=Scribe container +After=network-online.target + +[Container] +ContainerName=scribe +Image=localhost/scribe:latest +PublishPort=4345:8080 +Environment=SCRIBE_PORT=8080 +Environment=SCRIBE_HOST=0.0.0.0 +Environment=APP_DOMAIN=scribe.hyperreal.coffee +Environment=LUCKY_ENV=production +Environment=SECRET_KEY_BASE=<32-byte string> +Environment=PORT=8080 + +[Install] +WantedBy=multi-user.target default.target diff --git a/systemd/shaarli.container b/systemd/shaarli.container new file mode 100644 index 0000000..7cf7b61 --- /dev/null +++ b/systemd/shaarli.container @@ -0,0 +1,14 @@ +[Unit] +Description=Shaarli container +After=network-online.target + +[Container] +ContainerName=shaarli +Image=ghcr.io/shaarli/shaarli:release +PublishPort=4344:80 +Volume=shaarli-data:/var/www/shaarli/data:Z +Volume=shaarli-cache:/var/www/shaarli/cache:Z +Volume=/home/jas/shaarli/tpl:/var/www/shaarli/tpl:Z + +[Install] +WantedBy=multi-user.target default.target