homelab/roles/docker/templates/docker-compose.service.j2
Kris Lamoureux 7f91b24adb
Add Debian/Official Docker repo toggle
- Default docker_official toggle to false (for now)
- Preempt MariaDB restart before container restarts
- Start containers in a handler
2023-10-22 11:33:05 -04:00

15 lines
320 B
Django/Jinja

[Unit]
Description=%i {{ docker_compose_service }} service
PartOf=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory={{ docker_compose_root }}/%i
ExecStart={{ docker_compose }} up -d --remove-orphans
ExecStop={{ docker_compose }} down
[Install]
WantedBy=multi-user.target