From ab73b69d40483b2f565102290ae4be110b85ebc8 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Thu, 26 Jan 2017 21:28:15 -0800 Subject: [PATCH] Adding dev overrides and defaults --- ch13/ansible/container.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ch13/ansible/container.yml b/ch13/ansible/container.yml index 546082b..3811504 100644 --- a/ch13/ansible/container.yml +++ b/ch13/ansible/container.yml @@ -1,4 +1,9 @@ version: "2" +defaults: + DATABASE_NAME: mezzanine + DATABASE_USER: mezzanine + DATABASE_PASSWORD: mezzanine + services: memcached: image: ubuntu:xenial @@ -9,6 +14,11 @@ services: user: daemon nginx: image: nginx:1.11 + dev_overrides: + links: + - mezzanine + volumes_from: + - mezzanine mezzanine: image: ubuntu:xenial entrypoint: [/srv/bin/entrypoint.sh] @@ -16,3 +26,21 @@ services: working_dir: /srv/project expose: - "8000" + dev_overrides: + links: + - memcached + - postgres + depends_on: + - postgres + environment: + DATABASE_NAME: "{{ DATABASE_NAME }}" + DATABASE_USER: "{{ DATABASE_USER }}" + DATABASE_PASSWORD: "{{ DATABASE_PASSWORD }}" + postgres: + image: postgres:9.6 + dev_overrides: + environment: + POSTGRES_DB: "{{ DATABASE_NAME }}" + POSTGRES_USER: "{{ DATABASE_USER }}" + POSTGRES_PASSWORD: "{{ DATABASE_PASSWORD }}" + -- 2.44.0