infra/playbooks/roles/docker/files/docker-compose@.service

16 lines
361 B
SYSTEMD
Raw Normal View History

2024-03-17 18:21:46 -04:00
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory=/etc/docker/compose/%i
ExecStartPre=/usr/bin/docker compose pull
ExecStart=/usr/bin/docker compose up --detach --remove-orphans
ExecStop=/usr/bin/docker compose down
[Install]
WantedBy=multi-user.target