Commit f43c0195 authored by Daniel Dehennin's avatar Daniel Dehennin

Merge branch 'feature/do-not-start-when-running' into 'master'

feat(service): do not start the container if it's already runnnig

See merge request la-crise/discourse-formula!12
parents d4c46013 00095714
......@@ -9,9 +9,14 @@
include:
- {{ sls_service_rebuild }}
{%- set format = '--format "{{.Names}}" ' %}
{%- set filter = '--filter NAME=app --filter status=running' %}
discourse-service-running-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:start_cmd') }}
- cwd: {{ discourse.directory }}
- unless:
- test "$(docker ps {{ format }} {{ filter }})" = 'app'
- require:
- sls: {{ sls_service_rebuild }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment