ansible-edda/playbooks/roles/services/deploy/music/templates/systemd/container-music-collection.service

41 lines
2.0 KiB
SYSTEMD
Raw Normal View History

2023-02-21 00:06:29 +01:00
[Unit]
2023-03-19 18:11:16 +01:00
Description=Podman container-music-collection.service
2023-02-21 00:06:29 +01:00
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
BindsTo=pod-music.service
After=pod-music.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
2023-03-19 18:11:16 +01:00
ExecStartPre=/bin/rm -f %t/container-music-collection.pid %t/container-music-collection.ctr-id
2023-02-21 00:06:29 +01:00
ExecStart=/usr/bin/podman run \
2023-03-19 18:11:16 +01:00
--conmon-pidfile %t/container-music-collection.pid \
--cidfile %t/container-music-collection.ctr-id \
2023-02-21 00:06:29 +01:00
--cgroups=no-conmon \
--pod-id-file %t/pod-music.pod-id \
--replace \
--label "io.containers.autoupdate=image" \
2023-07-29 14:38:57 +02:00
--log-driver=journald \
2023-02-21 00:06:29 +01:00
-dt \
2023-07-23 00:37:19 +02:00
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
2023-03-19 18:11:16 +01:00
-v {{ services_data_directory }}/pod-music/collection/_data:/data \
-v {{ services_host_services[services_service_name].collection_path }}:/music:ro \
2023-02-21 00:06:29 +01:00
-e ND_PORT="80" \
2023-03-19 18:11:16 +01:00
-e ND_IGNOREDARTICLES="The El La Los Las Le Les Os O A" \
2023-02-21 00:06:29 +01:00
-e ND_ENABLESTARRATING="false" \
-e ND_LASTFM_ENABLED="false" \
-e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \
2023-03-19 18:11:16 +01:00
--name=pod-music-collection \
docker.io/deluan/navidrome:{{ services_service_deploy_versions.navidrome }}
2023-03-19 18:11:16 +01:00
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-music-collection.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-music-collection.ctr-id
PIDFile=%t/container-music-collection.pid
2023-02-21 00:06:29 +01:00
Type=forking
[Install]
WantedBy=multi-user.target default.target