From c439065b1d90016e9a60af2ba776d1b4d0330e16 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sat, 14 Jan 2017 21:08:27 -0800 Subject: [PATCH] Add postgres --- ch13/ansible/container.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ch13/ansible/container.yml b/ch13/ansible/container.yml index 6cabc39..495566a 100644 --- a/ch13/ansible/container.yml +++ b/ch13/ansible/container.yml @@ -1,4 +1,7 @@ version: "2" +defaults: + database_name: mezzanine + database_user: mezzanine services: # nginx: # image: nginx:1.11 @@ -13,9 +16,16 @@ services: command: [-m, "128"] entrypoint: memcached user: daemon + postgres: + image: postgres:9.6 + expose: + - "5432" + ports: + - "5432:5432" + environment: + POSTGRES_USER: "{{ database_user }}" + POSTGRES_PASSWORD: "{{ database_password }}" - # postgres: - # image: postgres:9.6 # Add your containers here, specifying the base image you want to build from # For example: # -- 2.44.0