Skip to content

Commit

Permalink
feat: externalize postgres env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshen committed May 14, 2024
1 parent bfd6841 commit 53c3118
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions postgres/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
POSTGRES_PORT=5432
POSTGRES_VERSION=12
POSTGRES_DATABASE=test
POSTGRES_USER=root
POSTGRES_PASSWORD=zaq12wsx
10 changes: 5 additions & 5 deletions postgres/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ volumes:
driver: local
services:
postgres:
image: postgres
image: postgres:${POSTGRES_VERSION}
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: zaq12wsx
POSTGRES_DB: test
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DATABASE}
ports:
- 5432:5432
- ${POSTGRES_PORT}:5432
volumes:
- pg_db_vol:/var/lib/postgresql/data
pgadmin:
Expand Down

0 comments on commit 53c3118

Please sign in to comment.