2023-09-19 16:48:05 +02:00
|
|
|
[Unit]
|
|
|
|
Description=%i service with docker compose
|
|
|
|
PartOf=docker.service
|
|
|
|
After=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
RemainAfterExit=true
|
|
|
|
WorkingDirectory=/etc/docker/compose/%i
|
2024-11-15 19:34:32 +01:00
|
|
|
ExecStartPre= /bin/sh -c 'until ping -c1 denali; do sleep 1; done;'
|
2023-09-19 16:48:05 +02:00
|
|
|
ExecStart=/usr/bin/docker compose up -d --remove-orphans
|
|
|
|
ExecStop=/usr/bin/docker compose down
|
2024-11-15 19:34:32 +01:00
|
|
|
Restart=on-failure
|
|
|
|
RestartSec=5s
|
2023-09-19 16:48:05 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|