Add generic docker-compose systemd service

This commit is contained in:
2022-05-26 23:50:14 -04:00
parent c0be314268
commit dc520a09e9
3 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
[Unit]
Description=%i docker-compose service
PartOf=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory={{ docker_root }}/%i
ExecStart={{ docker_compose }} up -d --remove-orphans
ExecStop={{ docker_compose }} down
[Install]
WantedBy=multi-user.target