Added enviroment variables.

This commit is contained in:
kirby.is.austin9@gmail.com
2025-06-18 09:05:44 +02:00
parent 5c1dc5cd15
commit 9cd5e2e124
2 changed files with 13 additions and 3 deletions

4
.env Normal file
View File

@@ -0,0 +1,4 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
POSTGRES_HOST=postgres

View File

@@ -5,6 +5,8 @@ services:
context: ./backend context: ./backend
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: backend container_name: backend
env_file:
- .env
ports: ports:
- "5000:5000" - "5000:5000"
volumes: volumes:
@@ -15,6 +17,8 @@ services:
context: ./frontend context: ./frontend
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: frontend container_name: frontend
env_file:
- .env
ports: ports:
- "80:80" - "80:80"
volumes: volumes:
@@ -27,10 +31,12 @@ services:
ports: ports:
- "5432:5432" - "5432:5432"
container_name: postgres container_name: postgres
env_file:
- .env
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres POSTGRES_DB: ${POSTGRES_DB}
volumes: volumes:
- postgres-data:/var/lib/postgresql/data - postgres-data:/var/lib/postgresql/data