File | Purpose |
---|---|
/etc/compose/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/docker-compose.service |
Service unit to start and manage docker compose |
/etc/systemd/system/docker-compose-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/docker-compose-reload.timer |
Timer unit to plan the reloads |
Put the above mentioned files in the corresponding places and let systemd load them:
# systemctl daemon-reload
# systemctl enable docker-compose docker-compose-reload
# systemctl start docker-compose docker-compose-reload
Here's a suggestion, for the timer to be accurate:
"Timer units with at least one OnCalendar= directive acquire a pair of additional After= dependencies on time-set.target and time-sync.target, in order to avoid being started before the system clock has been correctly set. See systemd.special(7) for details on these two targets."
https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html