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