diff --git a/template/docker-compose.yml b/template/docker-compose.yml index 9853bd9135ab1887158e89607fa455d1747a1415..8cf9eeedad37063d042b41dbd730abbe0e6a705f 100644 --- a/template/docker-compose.yml +++ b/template/docker-compose.yml @@ -46,6 +46,11 @@ services: traefik.enable: true traefik.frontend.rule: "Host:app.picasoft.net" traefik.port: 80 + # If the service has a database, + # tell Compose that it depends on it (i.e.) + # should be launched if the service is launched + depends_on: + - db # This avoid restarting a container on # startup when it has been explicitly stopped restart: unless-stopped