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]
Description=Podman pod-cloud-chown.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
After=pod-cloud.service
Before=pod-cloud-nextcloud.service
@ -8,10 +8,10 @@ OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
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 \
--conmon-pidfile %t/pod-cloud-chown.pid \
--cidfile %t/pod-cloud-chown.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \
--replace \
@ -20,10 +20,10 @@ ExecStart=/usr/bin/podman run \
-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \
--user=0 \
--entrypoint="/bin/bash" \
--name=pod-cloud-chown \
--name=%N \
docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \
-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
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-cloud-cron.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--conmon-pidfile %t/pod-cloud-cron.pid \
--cidfile %t/pod-cloud-cron.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \
--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/data/_data:/var/www/html/data \
-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 }} \
/cron.sh
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-cloud-cron.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-cloud-cron.ctr-id
PIDFile=%t/pod-cloud-cron.pid
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-cloud.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-cloud.pid \
--pod-id-file %t/pod-cloud.pod-id \
--name=cloud \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-cloud.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-cloud.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-cloud/pidfile
PIDFile=%t/pod-cloud.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-dash.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-dash.pid \
--pod-id-file %t/pod-dash.pod-id \
--name=dash \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-dash.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-dash.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-dash/pidfile
PIDFile=%t/pod-dash.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

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

View File

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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-database.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-database.pid \
--pod-id-file %t/pod-database.pod-id \
--name=database \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-database.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-database.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-database/pidfile
PIDFile=%t/pod-database.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-git.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-git.pid \
--pod-id-file %t/pod-git.pod-id \
--name=git \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-git.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-git.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-git/pidfile
PIDFile=%t/pod-git.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-metrics-prometheus.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--conmon-pidfile %t/pod-metrics-prometheus.pid \
--cidfile %t/pod-metrics-prometheus.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-metrics.pod-id \
--replace \
@ -25,14 +25,14 @@ ExecStart=/usr/bin/podman run \
-v ./.config/service/hosts:/etc/hosts:ro \
-v ./.config/service/prometheus.yml:/etc/prometheus/prometheus.yml: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 }}
# 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
# 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
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-metrics-prometheus.ctr-id
PIDFile=%t/pod-metrics-prometheus.pid
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-metrics.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-metrics.pid \
--pod-id-file %t/pod-metrics.pod-id \
--name=metrics \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-metrics.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-metrics.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-metrics/pidfile
PIDFile=%t/pod-metrics.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-music-archive.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--conmon-pidfile %t/pod-music-archive.pid \
--cidfile %t/pod-music-archive.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-music.pod-id \
--replace \
@ -29,11 +29,11 @@ ExecStart=/usr/bin/podman run \
-e ND_ENABLESTARRATING="false" \
-e ND_LASTFM_ENABLED="false" \
-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 }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-music-archive.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-music-archive.ctr-id
PIDFile=%t/pod-music-archive.pid
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-music-collection.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--conmon-pidfile %t/pod-music-collection.pid \
--cidfile %t/pod-music-collection.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-music.pod-id \
--replace \
@ -29,11 +29,11 @@ ExecStart=/usr/bin/podman run \
-e ND_ENABLESTARRATING="false" \
-e ND_LASTFM_ENABLED="false" \
-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 }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-music-collection.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-music-collection.ctr-id
PIDFile=%t/pod-music-collection.pid
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-music.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-music.pid \
--pod-id-file %t/pod-music.pod-id \
--name=music \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-music.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-music.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-music/pidfile
PIDFile=%t/pod-music.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-notes.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-notes.pid \
--pod-id-file %t/pod-notes.pod-id \
--name=notes \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-notes.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-notes.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-notes/pidfile
PIDFile=%t/pod-notes.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-{{ services_service_name }}-nginx.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -14,10 +14,10 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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=/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 \
--conmon-pidfile %t/pod-{{ services_service_name }}-nginx.pid \
--cidfile %t/pod-{{ services_service_name }}-nginx.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \
--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 var-lib-letsencrypt:/var/lib/letsencrypt:ro \
-v var-www-html:/var/www/html \
--name=pod-{{ services_service_name }}-nginx \
--name=%N \
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
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-{{ services_service_name }}-nginx.ctr-id
PIDFile=%t/pod-{{ services_service_name }}-nginx.pid
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-{{ services_service_name }}.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-{{ services_service_name }}.pid \
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \
--name={{ services_service_name }} \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-{{ services_service_name }}.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-{{ services_service_name }}.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-{{ services_service_name }}/pidfile
PIDFile=%t/pod-{{ services_service_name }}.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-www-nginx.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,10 +11,10 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--conmon-pidfile %t/pod-www-nginx.pid \
--cidfile %t/pod-www-nginx.ctr-id \
--conmon-pidfile %t/%N.pid \
--cidfile %t/%N.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-www.pod-id \
--replace \
@ -23,11 +23,11 @@ ExecStart=/usr/bin/podman run \
-dt \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf: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 }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-www-nginx.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-www-nginx.ctr-id
PIDFile=%t/pod-www-nginx.pid
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.ctr-id
PIDFile=%t/%N.pid
Type=forking
[Install]

View File

@ -1,5 +1,5 @@
[Unit]
Description=Podman pod-www.service
Description=Podman %n
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
@ -11,22 +11,22 @@ OnFailure=status-mail@%n.service
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--infra-conmon-pidfile %t/pod-www.pid \
--pod-id-file %t/pod-www.pod-id \
--name=www \
--infra-conmon-pidfile %t/%N.pid \
--pod-id-file %t/%N.pod-id \
--name=%N \
--network=none \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-www.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'
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 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/ifup 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
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-www.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-www/pidfile
PIDFile=%t/pod-www.pid
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/%N.pod-id
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/%N/pidfile
PIDFile=%t/%N.pid
Type=forking
[Install]