Skip to content

Commit

Permalink
Allow postgres data volume to be overridden with an envvar
Browse files Browse the repository at this point in the history
This makes it easier to use local database dumps

The compose file version was bumped to 2.1 in order to add support
for ${VARIABLE:-default}

https://docs.docker.com/compose/compose-file/#variable-substitution

[skip ci]
  • Loading branch information
sloria committed Apr 19, 2017
1 parent c76a245 commit 74afe9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version: '2'
version: '2.1'

services:

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version: '2'
version: '2.1'

services:

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reference README-docker-compose.md for instructions.

version: '2'
version: '2.1'

volumes:
postgres_data_vol:
Expand Down Expand Up @@ -63,7 +63,7 @@ services:
sed -i -e 's/max_connections.*/max_connections = 5000/' /var/lib/postgresql/data/postgresql.conf
sed -i -e 's/#log_min_duration_statement = .*/log_min_duration_statement = 0/' /var/lib/postgresql/data/postgresql.conf
volumes:
- postgres_data_vol:/var/lib/postgresql/data/
- "${POSTGRES_DATA_VOL:-postgres_data_vol}:/var/lib/postgresql/data/"
stdin_open: true

tokumx:
Expand Down

0 comments on commit 74afe9a

Please sign in to comment.