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

18 lines
411 B
SYSTEMD
Raw Normal View History

2024-01-03 01:03:22 -05:00
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
[Service]
Type=simple
Restart=always
RestartSec=3
2024-01-03 01:03:22 -05:00
RemainAfterExit=true
WorkingDirectory=/etc/docker/compose/%i
2024-07-02 00:55:09 -04:00
ExecStartPre=/bin/bash -c "/usr/bin/docker compose pull || true"
ExecStart=/usr/bin/docker compose up --detach --remove-orphans
ExecStop=/usr/bin/docker compose down
2024-01-03 01:03:22 -05:00
[Install]
WantedBy=multi-user.target