build: load secrets from .env instead of hardcoding
This commit is contained in:
14
compose.yml
14
compose.yml
@@ -3,11 +3,11 @@ services:
|
|||||||
image: docker.io/library/postgres:16
|
image: docker.io/library/postgres:16
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=postgres
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
- POSTGRES_PASSWORD=pass
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
- POSTGRES_DB=loft
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "127.0.0.1:5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- loft_db_data:/var/lib/postgresql/data
|
- loft_db_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -26,10 +26,10 @@ services:
|
|||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://postgres:pass@db:5432/loft
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
- STORAGE_PATH=/app/storage
|
- STORAGE_PATH=${STORAGE_PATH}
|
||||||
volumes:
|
volumes:
|
||||||
- loft_storage:/app/storage
|
- loft_storage:${STORAGE_PATH}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
loft_db_data:
|
loft_db_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user