From f00dc426e079fb8e01a4b98b1be6a099d0fdae21 Mon Sep 17 00:00:00 2001 From: Michal Wasilewski Date: Wed, 20 Sep 2017 22:29:44 +0200 Subject: [PATCH 1/2] make containers start when docker daemon comes up --- installer/local_docker/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installer/local_docker/tasks/main.yml b/installer/local_docker/tasks/main.yml index 7eba9d3575..f30bed7d28 100644 --- a/installer/local_docker/tasks/main.yml +++ b/installer/local_docker/tasks/main.yml @@ -99,6 +99,7 @@ docker_container: name: postgres state: started + restart_policy: always image: postgres:9.6 volumes: - "{{ postgres_data_dir }}:/var/lib/postgresql/data:Z" @@ -113,6 +114,7 @@ docker_container: name: rabbitmq state: started + restart_policy: always image: rabbitmq:3 env: RABBITMQ_DEFAULT_VHOST: "awx" @@ -122,6 +124,7 @@ docker_container: name: memcached state: started + restart_policy: always image: memcached:alpine - name: Wait for postgres and rabbitmq to activate @@ -169,6 +172,7 @@ docker_container: name: awx_web state: started + restart_policy: always image: "{{ awx_web_docker_actual_image }}:{{ awx_version }}" user: root ports: @@ -194,6 +198,7 @@ docker_container: name: awx_task state: started + restart_policy: always image: "{{ awx_task_docker_actual_image }}:{{ awx_version }}" links: "{{ awx_task_container_links|list }}" user: root From 4236654b0c6e10873dd1ab6c07cff6c7fc4942a6 Mon Sep 17 00:00:00 2001 From: Michal Wasilewski Date: Thu, 21 Sep 2017 21:15:01 +0200 Subject: [PATCH 2/2] use unless-stopped instead always --- installer/local_docker/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/installer/local_docker/tasks/main.yml b/installer/local_docker/tasks/main.yml index f30bed7d28..60def89d95 100644 --- a/installer/local_docker/tasks/main.yml +++ b/installer/local_docker/tasks/main.yml @@ -99,7 +99,7 @@ docker_container: name: postgres state: started - restart_policy: always + restart_policy: unless-stopped image: postgres:9.6 volumes: - "{{ postgres_data_dir }}:/var/lib/postgresql/data:Z" @@ -114,7 +114,7 @@ docker_container: name: rabbitmq state: started - restart_policy: always + restart_policy: unless-stopped image: rabbitmq:3 env: RABBITMQ_DEFAULT_VHOST: "awx" @@ -124,7 +124,7 @@ docker_container: name: memcached state: started - restart_policy: always + restart_policy: unless-stopped image: memcached:alpine - name: Wait for postgres and rabbitmq to activate @@ -172,7 +172,7 @@ docker_container: name: awx_web state: started - restart_policy: always + restart_policy: unless-stopped image: "{{ awx_web_docker_actual_image }}:{{ awx_version }}" user: root ports: @@ -198,7 +198,7 @@ docker_container: name: awx_task state: started - restart_policy: always + restart_policy: unless-stopped image: "{{ awx_task_docker_actual_image }}:{{ awx_version }}" links: "{{ awx_task_container_links|list }}" user: root