Introduce stop action

This enables users of this role to execute `docker-compose stop` instead
of `docker-compose down` on shutdown and speed up the startup. For full
discussion leading to this see: https://git.io/vpIOy

Thanks @EugenMayer for the suggestion!

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-04-18 17:53:21 +02:00
parent d44d1c0829
commit 1b54459c12
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
---
docker_compose_reload_minutes: 15
docker_compose_stop_action: down
docker_compose_config:
version: "3"

View File

@ -67,7 +67,7 @@
ExecStartPre=/usr/local/bin/docker-compose pull --quiet --ignore-pull-failures
ExecStart=/usr/local/bin/docker-compose up -d --remove-orphans
ExecStop=/usr/local/bin/docker-compose down
ExecStop=/usr/local/bin/docker-compose {{ docker_compose_stop_action }}
ExecReload=/usr/local/bin/docker-compose pull --quiet --ignore-pull-failures
ExecReload=/usr/local/bin/docker-compose up -d --remove-orphans