Skip to content

Commit

Permalink
postgresql version can specify
Browse files Browse the repository at this point in the history
  • Loading branch information
bestlong committed Feb 6, 2020
1 parent 00676f0 commit 63b3d2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,10 @@ services:

### PostgreSQL ###########################################
postgres:
build: ./postgres
build:
context: ./postgres
args:
- POSTGRES_VERSION=${POSTGRES_VERSION}
volumes:
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
- ${POSTGRES_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
Expand Down
1 change: 1 addition & 0 deletions env-example
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d

### POSTGRES ##############################################

POSTGRES_VERSION=alpine
POSTGRES_DB=default
POSTGRES_USER=default
POSTGRES_PASSWORD=secret
Expand Down
5 changes: 2 additions & 3 deletions postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM postgres:alpine

LABEL maintainer="Ben M <[email protected]>"
ARG POSTGRES_VERSION=alpine
FROM postgres:${POSTGRES_VERSION}

CMD ["postgres"]

Expand Down

0 comments on commit 63b3d2f

Please sign in to comment.