From ab6b1abe933ac7f436ebe8b61c4566a0d2d57000 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin <quentinduchemin@tuta.io> Date: Thu, 11 Jun 2020 22:26:36 +0200 Subject: [PATCH] [Doc] Add depends_on in template --- template/docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/template/docker-compose.yml b/template/docker-compose.yml index 9853bd91..8cf9eeed 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 -- GitLab