homeserver-iac/roles/containers/templates/docker-compose.service.j2
dogeystamp 0288cea768
roles/containers: use systemd instead of docker module
arch doesn't package python-docker-compose so just docker compose up via
systemd instead of ansible
2023-08-27 17:39:08 -04:00

16 lines
422 B
Django/Jinja

[Unit]
Description=Services manager with docker-compose
Requires=docker.service
After=docker.service
[Service]
WorkingDirectory={{ docker_compose_dir }}
ExecStartPre=-/usr/bin/docker compose pull
ExecStart=/usr/bin/docker compose up --remove-orphans
ExecStop=/usr/bin/docker compose down
ExecReload=/usr/bin/docker compose pull
ExecReload=/usr/bin/docker compose up --remove-orphans
[Install]
WantedBy=multi-user.target