Use systemd unit file specifiers where possible

This commit is contained in:
Wojciech Kozlowski 2023-11-11 17:35:09 +01:00
parent edceb1bd0b
commit fda3fec63c
25 changed files with 226 additions and 226 deletions

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-cloud-chown.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
After=pod-cloud.service After=pod-cloud.service
Before=pod-cloud-nextcloud.service Before=pod-cloud-nextcloud.service
@ -8,10 +8,10 @@ OnFailure=status-mail@%n.service
[Service] [Service]
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-cloud-chown.pid %t/pod-cloud-chown.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-cloud-chown.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-cloud-chown.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \ --pod-id-file %t/pod-cloud.pod-id \
--replace \ --replace \
@ -20,10 +20,10 @@ ExecStart=/usr/bin/podman run \
-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \ -v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \
--user=0 \ --user=0 \
--entrypoint="/bin/bash" \ --entrypoint="/bin/bash" \
--name=pod-cloud-chown \ --name=%N \
docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \ docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \
-c "chown -R www-data:www-data /var/www/html /media/external" -c "chown -R www-data:www-data /var/www/html /media/external"
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-cloud-chown.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
Type=oneshot Type=oneshot
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-cloud-cron.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-cloud-cron.pid %t/pod-cloud-cron.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-cloud-cron.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-cloud-cron.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \ --pod-id-file %t/pod-cloud.pod-id \
--replace \ --replace \
@ -26,12 +26,12 @@ ExecStart=/usr/bin/podman run \
-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html \ -v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html \
-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data \ -v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data \
-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \ -v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \
--name=pod-cloud-cron \ --name=%N \
docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \ docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \
/cron.sh /cron.sh
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-cloud-cron.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-cloud-cron.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-cloud-cron.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-cloud-nextcloud.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -15,10 +15,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-cloud-nextcloud.pid %t/pod-cloud-nextcloud.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-cloud-nextcloud.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-cloud-nextcloud.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \ --pod-id-file %t/pod-cloud.pod-id \
--replace \ --replace \
@ -48,11 +48,11 @@ ExecStart=/usr/bin/podman run \
-e SMTP_PASSWORD="{{ services[services_service_name].smtp.password }}" \ -e SMTP_PASSWORD="{{ services[services_service_name].smtp.password }}" \
-e MAIL_FROM_ADDRESS="cloud" \ -e MAIL_FROM_ADDRESS="cloud" \
-e MAIL_DOMAIN="{{ services[services_service_name].domain }}" \ -e MAIL_DOMAIN="{{ services[services_service_name].domain }}" \
--name=pod-cloud-nextcloud \ --name=%N \
docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-cloud-nextcloud.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-cloud-nextcloud.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-cloud-nextcloud.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-cloud-nginx.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-cloud-nginx.pid %t/pod-cloud-nginx.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-cloud-nginx.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-cloud-nginx.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \ --pod-id-file %t/pod-cloud.pod-id \
--replace \ --replace \
@ -25,11 +25,11 @@ ExecStart=/usr/bin/podman run \
-v ./.config/service/nginx.conf:/etc/nginx/nginx.conf:ro \ -v ./.config/service/nginx.conf:/etc/nginx/nginx.conf:ro \
-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html \ -v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html \
-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data \ -v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data \
--name=pod-cloud-nginx \ --name=%N \
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }} docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-cloud-nginx.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-cloud-nginx.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-cloud-nginx.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-cloud-redis.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-cloud-redis.pid %t/pod-cloud-redis.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-cloud-redis.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-cloud-redis.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \ --pod-id-file %t/pod-cloud.pod-id \
--replace \ --replace \
@ -22,12 +22,12 @@ ExecStart=/usr/bin/podman run \
--log-driver=journald \ --log-driver=journald \
-dt \ -dt \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \ -v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
-v pod-cloud-redis---data:/data \ -v %N---data:/data \
--name=pod-cloud-redis \ --name=%N \
docker.io/library/redis:{{ services_service_deploy_versions.redis }} docker.io/library/redis:{{ services_service_deploy_versions.redis }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-cloud-redis.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-cloud-redis.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-cloud-redis.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-cloud.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-cloud.pid %t/pod-cloud.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-cloud.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-cloud.pod-id \ --pod-id-file %t/%N.pod-id \
--name=cloud \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-cloud.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" cloud) > {{ services_containers_directory }}/pod-cloud/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-cloud ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-cloud
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-cloud ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-cloud
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-cloud ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-cloud
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-cloud.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-cloud.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-cloud/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-cloud.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-dash-grafana.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-dash-grafana.pid %t/pod-dash-grafana.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-dash-grafana.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-dash-grafana.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-dash.pod-id \ --pod-id-file %t/pod-dash.pod-id \
--replace \ --replace \
@ -24,11 +24,11 @@ ExecStart=/usr/bin/podman run \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \ -v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
-v ./.config/service/hosts:/etc/hosts:ro \ -v ./.config/service/hosts:/etc/hosts:ro \
-v {{ services_data_directory }}/pod-dash/data/_data:/var/lib/grafana:U \ -v {{ services_data_directory }}/pod-dash/data/_data:/var/lib/grafana:U \
--name=pod-dash-grafana \ --name=%N \
docker.io/grafana/grafana:{{ services_service_deploy_versions.grafana }} docker.io/grafana/grafana:{{ services_service_deploy_versions.grafana }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-dash-grafana.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-dash-grafana.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-dash-grafana.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-dash.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-dash.pid %t/pod-dash.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-dash.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-dash.pod-id \ --pod-id-file %t/%N.pod-id \
--name=dash \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-dash.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" dash) > {{ services_containers_directory }}/pod-dash/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-dash ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-dash
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-dash ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-dash
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-dash ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-dash
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-dash.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-dash.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-dash/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-dash.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-database-pgadmin.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-database-pgadmin.pid %t/pod-database-pgadmin.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-database-pgadmin.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-database-pgadmin.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-database.pod-id \ --pod-id-file %t/pod-database.pod-id \
--replace \ --replace \
@ -26,11 +26,11 @@ ExecStart=/usr/bin/podman run \
-v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password:U,ro \ -v ./.config/service/pgadmin.password:/run/secrets/pgadmin.password:U,ro \
-e PGADMIN_DEFAULT_EMAIL="{{ services[services_service_name].pgadmin.email }}" \ -e PGADMIN_DEFAULT_EMAIL="{{ services[services_service_name].pgadmin.email }}" \
-e PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin.password \ -e PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin.password \
--name=pod-database-pgadmin \ --name=%N \
docker.io/dpage/pgadmin4:{{ services_service_deploy_versions.pgadmin4 }} docker.io/dpage/pgadmin4:{{ services_service_deploy_versions.pgadmin4 }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-database-pgadmin.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-database-pgadmin.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-database-pgadmin.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-database-postgres.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -13,10 +13,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-database-postgres.pid %t/pod-database-postgres.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-database-postgres.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-database-postgres.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-database.pod-id \ --pod-id-file %t/pod-database.pod-id \
--replace \ --replace \
@ -29,11 +29,11 @@ ExecStart=/usr/bin/podman run \
-v {{ services_data_directory }}/pod-database/wal/_data:/var/lib/postgresql-wal \ -v {{ services_data_directory }}/pod-database/wal/_data:/var/lib/postgresql-wal \
-e POSTGRES_INITDB_WALDIR=/var/lib/postgresql-wal \ -e POSTGRES_INITDB_WALDIR=/var/lib/postgresql-wal \
-v {{ services_data_directory }}/pod-database/data/_data:/var/lib/postgresql/data \ -v {{ services_data_directory }}/pod-database/data/_data:/var/lib/postgresql/data \
--name=pod-database-postgres \ --name=%N \
docker.io/library/postgres:{{ services_service_deploy_versions.postgres }} docker.io/library/postgres:{{ services_service_deploy_versions.postgres }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-database-postgres.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-database-postgres.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-database-postgres.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-database.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-database.pid %t/pod-database.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-database.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-database.pod-id \ --pod-id-file %t/%N.pod-id \
--name=database \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-database.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" database) > {{ services_containers_directory }}/pod-database/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-database ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-database
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-database ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-database
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-database ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-database
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-database.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-database.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-database/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-database.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-git-gitea.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-git-gitea.pid %t/pod-git-gitea.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-git-gitea.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-git-gitea.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-git.pod-id \ --pod-id-file %t/pod-git.pod-id \
--replace \ --replace \
@ -47,11 +47,11 @@ ExecStart=/usr/bin/podman run \
-e GITEA__mailer__PASSWD="{{ services[services_service_name].smtp.password }}" \ -e GITEA__mailer__PASSWD="{{ services[services_service_name].smtp.password }}" \
-e GITEA__service__DISABLE_REGISTRATION="true" \ -e GITEA__service__DISABLE_REGISTRATION="true" \
-e GITEA__service__ENABLE_NOTIFY_MAIL="true" \ -e GITEA__service__ENABLE_NOTIFY_MAIL="true" \
--name=pod-git-gitea \ --name=%N \
docker.io/gitea/gitea:{{ services_service_deploy_versions.gitea }} docker.io/gitea/gitea:{{ services_service_deploy_versions.gitea }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-git-gitea.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-git-gitea.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-git-gitea.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-git.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-git.pid %t/pod-git.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-git.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-git.pod-id \ --pod-id-file %t/%N.pod-id \
--name=git \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-git.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" git) > {{ services_containers_directory }}/pod-git/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-git ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-git
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-git ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-git
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-git ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-git
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-git.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-git.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-git/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-git.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-metrics-prometheus.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-metrics-prometheus.pid %t/pod-metrics-prometheus.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-metrics-prometheus.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-metrics-prometheus.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-metrics.pod-id \ --pod-id-file %t/pod-metrics.pod-id \
--replace \ --replace \
@ -25,14 +25,14 @@ ExecStart=/usr/bin/podman run \
-v ./.config/service/hosts:/etc/hosts:ro \ -v ./.config/service/hosts:/etc/hosts:ro \
-v ./.config/service/prometheus.yml:/etc/prometheus/prometheus.yml:U \ -v ./.config/service/prometheus.yml:/etc/prometheus/prometheus.yml:U \
-v {{ services_data_directory }}/pod-metrics/data/_data:/prometheus:U \ -v {{ services_data_directory }}/pod-metrics/data/_data:/prometheus:U \
--name=pod-metrics-prometheus \ --name=%N \
docker.io/prom/prometheus:{{ services_service_deploy_versions.prometheus }} docker.io/prom/prometheus:{{ services_service_deploy_versions.prometheus }}
# Careful about appending CLI arguments - in addition to the new arguments, all the arguments from # Careful about appending CLI arguments - in addition to the new arguments, all the arguments from
# the upstream Dockerfile must also be re-appended and it is not possible it use the configuration # the upstream Dockerfile must also be re-appended and it is not possible it use the configuration
# file to configure some arguments: https://github.com/prometheus/prometheus/issues/6188 # file to configure some arguments: https://github.com/prometheus/prometheus/issues/6188
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-metrics-prometheus.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-metrics-prometheus.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-metrics-prometheus.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-metrics.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-metrics.pid %t/pod-metrics.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-metrics.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-metrics.pod-id \ --pod-id-file %t/%N.pod-id \
--name=metrics \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-metrics.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" metrics) > {{ services_containers_directory }}/pod-metrics/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-metrics ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-metrics
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-metrics ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-metrics
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-metrics ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-metrics
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-metrics.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-metrics.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-metrics/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-metrics.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-music-archive.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-music-archive.pid %t/pod-music-archive.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-music-archive.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-music-archive.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-music.pod-id \ --pod-id-file %t/pod-music.pod-id \
--replace \ --replace \
@ -29,11 +29,11 @@ ExecStart=/usr/bin/podman run \
-e ND_ENABLESTARRATING="false" \ -e ND_ENABLESTARRATING="false" \
-e ND_LASTFM_ENABLED="false" \ -e ND_LASTFM_ENABLED="false" \
-e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \ -e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \
--name=pod-music-archive \ --name=%N \
docker.io/deluan/navidrome:{{ services_service_deploy_versions.navidrome }} docker.io/deluan/navidrome:{{ services_service_deploy_versions.navidrome }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-music-archive.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-music-archive.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-music-archive.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-music-collection.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-music-collection.pid %t/pod-music-collection.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-music-collection.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-music-collection.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-music.pod-id \ --pod-id-file %t/pod-music.pod-id \
--replace \ --replace \
@ -29,11 +29,11 @@ ExecStart=/usr/bin/podman run \
-e ND_ENABLESTARRATING="false" \ -e ND_ENABLESTARRATING="false" \
-e ND_LASTFM_ENABLED="false" \ -e ND_LASTFM_ENABLED="false" \
-e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \ -e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \
--name=pod-music-collection \ --name=%N \
docker.io/deluan/navidrome:{{ services_service_deploy_versions.navidrome }} docker.io/deluan/navidrome:{{ services_service_deploy_versions.navidrome }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-music-collection.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-music-collection.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-music-collection.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-music.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-music.pid %t/pod-music.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-music.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-music.pod-id \ --pod-id-file %t/%N.pod-id \
--name=music \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-music.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" music) > {{ services_containers_directory }}/pod-music/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-music ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-music
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-music ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-music
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-music ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-music
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-music.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-music.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-music/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-music.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-notes-joplin.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-notes-joplin.pid %t/pod-notes-joplin.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-notes-joplin.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-notes-joplin.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-notes.pod-id \ --pod-id-file %t/pod-notes.pod-id \
--replace \ --replace \
@ -41,11 +41,11 @@ ExecStart=/usr/bin/podman run \
-e MAILER_NOREPLY_NAME="Joplin" \ -e MAILER_NOREPLY_NAME="Joplin" \
-e MAILER_NOREPLY_EMAIL="noreply@{{ services[services_service_name].domain }}" \ -e MAILER_NOREPLY_EMAIL="noreply@{{ services[services_service_name].domain }}" \
-e STORAGE_DRIVER="Type=Filesystem; Path=/data" \ -e STORAGE_DRIVER="Type=Filesystem; Path=/data" \
--name=pod-notes-joplin \ --name=%N \
docker.io/joplin/server:{{ services_service_deploy_versions.joplin }} docker.io/joplin/server:{{ services_service_deploy_versions.joplin }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-notes-joplin.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-notes-joplin.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-notes-joplin.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-notes.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-notes.pid %t/pod-notes.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-notes.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-notes.pod-id \ --pod-id-file %t/%N.pod-id \
--name=notes \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-notes.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" notes) > {{ services_containers_directory }}/pod-notes/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-notes ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-notes
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-notes ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-notes
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-notes ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-notes
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-notes.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-notes.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-notes/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-notes.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-{{ services_service_name }}-certbot.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-{{ services_service_name }}-certbot.pid %t/pod-{{ services_service_name }}-certbot.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-{{ services_service_name }}-certbot.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-{{ services_service_name }}-certbot.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \ --pod-id-file %t/pod-{{ services_service_name }}.pod-id \
--replace \ --replace \
@ -28,12 +28,12 @@ ExecStart=/usr/bin/podman run \
-v ./.config/service/crontabs-root:/etc/crontabs/root \ -v ./.config/service/crontabs-root:/etc/crontabs/root \
-v /etc/timezone:/etc/timezone:ro \ -v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \ -v /etc/localtime:/etc/localtime:ro \
--name=pod-{{ services_service_name }}-certbot \ --name=%N \
--entrypoint=/usr/sbin/crond \ --entrypoint=/usr/sbin/crond \
docker.io/certbot/certbot:{{ services_service_deploy_versions.certbot }} -f docker.io/certbot/certbot:{{ services_service_deploy_versions.certbot }} -f
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-{{ services_service_name }}-certbot.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-{{ services_service_name }}-certbot.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-{{ services_service_name }}-certbot.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-{{ services_service_name }}-nginx.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -14,10 +14,10 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/usr/bin/sh -c 'echo resolver $(awk '\''BEGIN{ORS=" "} $1=="nameserver" {print $2}'\'' {{ system_etc_root_directory }}/resolv.conf) ";" > %t/resolver.conf' ExecStartPre=/usr/bin/sh -c 'echo resolver $(awk '\''BEGIN{ORS=" "} $1=="nameserver" {print $2}'\'' {{ system_etc_root_directory }}/resolv.conf) ";" > %t/resolver.conf'
ExecStartPre=/bin/rm -f %t/pod-{{ services_service_name }}-nginx.pid %t/pod-{{ services_service_name }}-nginx.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-{{ services_service_name }}-nginx.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-{{ services_service_name }}-nginx.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \ --pod-id-file %t/pod-{{ services_service_name }}.pod-id \
--replace \ --replace \
@ -34,11 +34,11 @@ ExecStart=/usr/bin/podman run \
-v {{ services_data_directory }}/{{ services_service_user_name }}/etc-letsencrypt/_data:/etc/letsencrypt:ro \ -v {{ services_data_directory }}/{{ services_service_user_name }}/etc-letsencrypt/_data:/etc/letsencrypt:ro \
-v var-lib-letsencrypt:/var/lib/letsencrypt:ro \ -v var-lib-letsencrypt:/var/lib/letsencrypt:ro \
-v var-www-html:/var/www/html \ -v var-www-html:/var/www/html \
--name=pod-{{ services_service_name }}-nginx \ --name=%N \
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }} docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-{{ services_service_name }}-nginx.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-{{ services_service_name }}-nginx.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-{{ services_service_name }}-nginx.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-{{ services_service_name }}.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-{{ services_service_name }}.pid %t/pod-{{ services_service_name }}.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-{{ services_service_name }}.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \ --pod-id-file %t/%N.pod-id \
--name={{ services_service_name }} \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-{{ services_service_name }}.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" {{ services_service_name }}) > {{ services_containers_directory }}/pod-{{ services_service_name }}/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-{{ services_service_name }} ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-{{ services_service_name }}
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-{{ services_service_name }} ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-{{ services_service_name }}
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-{{ services_service_name }} ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-{{ services_service_name }}
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-{{ services_service_name }}.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-{{ services_service_name }}.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-{{ services_service_name }}/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-{{ services_service_name }}.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-www-nginx.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-www-nginx.pid %t/pod-www-nginx.ctr-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.ctr-id
ExecStart=/usr/bin/podman run \ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-www-nginx.pid \ --conmon-pidfile %t/%N.pid \
--cidfile %t/pod-www-nginx.ctr-id \ --cidfile %t/%N.ctr-id \
--cgroups=no-conmon \ --cgroups=no-conmon \
--pod-id-file %t/pod-www.pod-id \ --pod-id-file %t/pod-www.pod-id \
--replace \ --replace \
@ -23,11 +23,11 @@ ExecStart=/usr/bin/podman run \
-dt \ -dt \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \ -v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
-v ./.config/service/wojciechkozlowski.eu/public:/usr/share/nginx/html:ro \ -v ./.config/service/wojciechkozlowski.eu/public:/usr/share/nginx/html:ro \
--name=pod-www-nginx \ --name=%N \
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }} docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-www-nginx.ctr-id -t 10 ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-www-nginx.ctr-id ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/pod-www-nginx.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Podman pod-www.service Description=Podman %n
Documentation=man:podman-generate-systemd(1) Documentation=man:podman-generate-systemd(1)
Wants=network.target Wants=network.target
After=network-online.target After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure Restart=on-failure
TimeoutStopSec=70 TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/pod-www.pid %t/pod-www.pod-id ExecStartPre=/bin/rm -f %t/%N.pid %t/%N.pod-id
ExecStartPre=/usr/bin/podman pod create \ ExecStartPre=/usr/bin/podman pod create \
--infra-conmon-pidfile %t/pod-www.pid \ --infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/pod-www.pod-id \ --pod-id-file %t/%N.pod-id \
--name=www \ --name=%N \
--network=none \ --network=none \
--replace --replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-www.pod-id ExecStart=/usr/bin/podman pod start --pod-id-file %t/%N.pod-id
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" www) > {{ services_containers_directory }}/pod-www/pidfile' ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman pod inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" %N) > {{ services_containers_directory }}/%N/pidfile'
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-www ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-www
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-www ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-www
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-www ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-www
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-www.pod-id -t 10 ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/%N.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-www.pod-id ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-www/pidfile ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/pod-www.pid PIDFile=%t/%N.pid
Type=forking Type=forking
[Install] [Install]