Skip to content

Commit

Permalink
Added common.yml compose file, updated docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
prawn-cake committed Sep 20, 2015
1 parent e2e03bd commit 575c180
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
8 changes: 8 additions & 0 deletions compose/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
postgresql_common:
build: pgclient/system_test
environment:
POSTGRES_PASSWORD: test # Set password for default (postgres) user
PGPASSWORD: test # For using `psql -c ...` without password

# Override
command: echo "CREATE DATABASE test WITH OWNER postgres;" >> /docker-entrypoint-initdb.d/create_db.sql && /docker-entrypoint.sh
32 changes: 29 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Latest one
postgresql:
build: pgclient/system_test
ports:
- "0.0.0.0:5432:5432"
environment:
POSTGRES_PASSWORD: test
extends:
file: compose/common.yml
service: postgresql_common

# Older verions
postgresql_90:
image: postgres:9.0
ports:
- "0.0.0.0:54390:5432"
extends:
file: compose/common.yml
service: postgresql_common

postgresql_91:
image: postgres:9.1
ports:
- "0.0.0.0:54391:5432"
extends:
file: compose/common.yml
service: postgresql_common

postgresql_92:
image: postgres:9.2
ports:
- "0.0.0.0:54392:5432"
extends:
file: compose/common.yml
service: postgresql_common

0 comments on commit 575c180

Please sign in to comment.