Skip to content

Commit 582a28a

Browse files
committed
Allow setting Postgres through env variables while using Compose
1 parent 6b6cd40 commit 582a28a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docker-compose.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
services:
22
postgres:
3-
image: postgres:17
3+
image: postgres:${POSTGRES_VERSION:-17}
44
environment:
5-
POSTGRES_USER: postgres
6-
POSTGRES_PASSWORD: postgres
7-
POSTGRES_DB: postgres_doctrine_test
5+
POSTGRES_USER: ${POSTGRES_USER:-postgres}
6+
POSTGRES_PORT: ${POSTGRES_USER:-5432}
7+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
8+
POSTGRES_DB: ${POSTGRES_DB:-postgres_doctrine_test}
89
ports:
910
- "5432:5432"
1011
volumes:

0 commit comments

Comments
 (0)