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

41 lines
1.5 KiB
Desktop File

[Unit]
Description=Podman pod-music-collection.service
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
ExecStartPre=/bin/rm -f %t/pod-music-collection.pid %t/pod-music-collection.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/pod-music-collection.pid \
--cidfile %t/pod-music-collection.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-music.pod-id \
--replace \
--label "io.containers.autoupdate=image" \
--log-driver=journald \
-dt \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
-v {{ services_data_directory }}/pod-music/collection/_data:/data \
-v {{ services_host_services[services_service_name].collection_path }}:/music:ro \
-e ND_PORT="80" \
-e ND_IGNOREDARTICLES="The El La Los Las Le Les Os O A" \
-e ND_ENABLESTARRATING="false" \
-e ND_LASTFM_ENABLED="false" \
-e ND_PASSWORDENCRYPTIONKEY={{ services[services_service_name].password_encryption_key }} \
--name=pod-music-collection \
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
Type=forking
[Install]
WantedBy=multi-user.target default.target