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
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=pass
|
||||
- POSTGRES_DB=loft
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "127.0.0.1:5432:5432"
|
||||
volumes:
|
||||
- loft_db_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
@@ -26,10 +26,10 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:pass@db:5432/loft
|
||||
- STORAGE_PATH=/app/storage
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- STORAGE_PATH=${STORAGE_PATH}
|
||||
volumes:
|
||||
- loft_storage:/app/storage
|
||||
- loft_storage:${STORAGE_PATH}
|
||||
|
||||
volumes:
|
||||
loft_db_data:
|
||||
|
||||
Reference in New Issue
Block a user