2024-05-01 04:33:35 -04:00
|
|
|
[Unit]
|
|
|
|
Description=%i service with docker compose
|
|
|
|
Requires=docker.service
|
|
|
|
After=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
RemainAfterExit=true
|
|
|
|
WorkingDirectory=/etc/docker/compose/%i
|
2024-07-02 00:51:46 -04:00
|
|
|
ExecStartPre=/bin/bash -c "/usr/bin/docker compose pull || true"
|
2024-05-01 04:33:35 -04:00
|
|
|
ExecStart=/usr/bin/docker compose up --detach --remove-orphans
|
|
|
|
ExecStop=/usr/bin/docker compose down
|
|
|
|
Restart=always
|
|
|
|
RestartSec=5
|
|
|
|
StartLimitInterval=500
|
|
|
|
StartLimitBurst=3
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|