feat(api): config from env vars (HOST, PORT, CORS_ALLOWED_ORIGINS, DATABASE_URL)

This commit is contained in:
2026-04-09 01:23:10 +02:00
parent 808ce287a5
commit b1d778284c
5 changed files with 93 additions and 11 deletions

View File

@@ -19,6 +19,11 @@ services:
- "${API_PORT:-8000}:8000"
environment:
DATABASE_URL: sqlite:///app/data/pocket-chords.db
HOST: 0.0.0.0
PORT: 8000
# Comma-separated allowed origins, or * for any.
# Lock this down in production: https://pocketchords.yourdomain.com
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-*}
volumes:
- api-data:/app/data