fix: replace hardcoded DB credentials with env var interpolation in docker-compose.yml
All DATABASE_URL values and postgres service env vars now use
\${POSTGRES_USER}, \${POSTGRES_PASSWORD}, \${POSTGRES_DB} interpolation
instead of hardcoded ml_user/ml_password/candle_annotator values.
Also updated pg_isready healthcheck to use the same env vars.
Closes task 1.5.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9bc82b822c
commit
e3469ec39f
2 changed files with 7 additions and 7 deletions
|
|
@ -7,7 +7,7 @@ services:
|
|||
- ml-data:/app/ml-data
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://ml_user:ml_password@postgres:5432/candle_annotator
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
||||
- INFERENCE_API_URL=http://ml-service:8001
|
||||
- INFERENCE_API_TIMEOUT=30000
|
||||
- INFERENCE_BATCH_TIMEOUT=120000
|
||||
|
|
@ -34,7 +34,7 @@ services:
|
|||
- mlflow-data:/app/mlruns
|
||||
environment:
|
||||
- MLFLOW_TRACKING_URI=http://mlflow:5000
|
||||
- DATABASE_URL=postgresql://ml_user:ml_password@postgres:5432/candle_annotator
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
||||
- PYTHONUNBUFFERED=1
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
|
|
@ -70,12 +70,12 @@ services:
|
|||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_USER=ml_user
|
||||
- POSTGRES_PASSWORD=ml_password
|
||||
- POSTGRES_DB=candle_annotator
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ml_user -d candle_annotator"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue