2023-08-27 17:39:08 -04:00
|
|
|
[Unit]
|
|
|
|
Description=Services manager with docker-compose
|
2024-06-17 17:48:29 -04:00
|
|
|
{% if wireguard_services %}
|
|
|
|
Requires=docker.service wg-quick@{{ wireguard_interface }}.service
|
|
|
|
After=docker.service wg-quick@{{ wireguard_interface }}.service
|
|
|
|
{% else %}
|
2023-08-27 17:39:08 -04:00
|
|
|
Requires=docker.service
|
|
|
|
After=docker.service
|
2024-06-17 17:48:29 -04:00
|
|
|
{% endif %}
|
2023-08-27 17:39:08 -04:00
|
|
|
|
|
|
|
[Service]
|
2023-08-27 20:33:18 -04:00
|
|
|
User=docker
|
|
|
|
Group=docker
|
2023-08-27 17:39:08 -04:00
|
|
|
WorkingDirectory={{ docker_compose_dir }}
|
|
|
|
ExecStartPre=-/usr/bin/docker compose pull
|
|
|
|
ExecStart=/usr/bin/docker compose up --remove-orphans
|
|
|
|
ExecStop=/usr/bin/docker compose down
|
|
|
|
ExecReload=/usr/bin/docker compose pull
|
2023-08-27 21:59:01 -04:00
|
|
|
ExecReload=/usr/bin/docker compose up --remove-orphans --detach
|
2024-03-10 21:21:02 -04:00
|
|
|
TimeoutSec=900
|
2023-08-27 17:39:08 -04:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|