From: Lorin Hochstein Date: Sun, 15 Jan 2017 05:08:27 +0000 (-0800) Subject: Add postgres X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=c439065b1d90016e9a60af2ba776d1b4d0330e16;p=ansiblebook.git Add postgres --- 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: #