Fix Docker deployment: Update settings.py defaults and Dockerfile for proper environment variable handling
- Updated settings.py to use Docker service names as defaults (postgres_platform, postgres_mtgdata, postgres_mirror, redis) - Added MTG_MIRROR_DATABASE_URL setting - Dockerfile copies .env file into container for pydantic-settings - Entry point script handles dependency checking and migrations before app startup
This commit is contained in:
@@ -19,13 +19,16 @@ class Settings(BaseSettings):
|
||||
JWT_SECRET_KEY: str = "change-me-in-production"
|
||||
|
||||
# Database - Primary (mtgonline app)
|
||||
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/mtgo_platform"
|
||||
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@postgres_platform:5432/mtgo_platform"
|
||||
|
||||
# Database - Secondary (mtgjson data)
|
||||
MTG_DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/mtg_data"
|
||||
MTG_DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@postgres_mtgdata:5432/mtgdata"
|
||||
|
||||
# Database - Mirror
|
||||
MTG_MIRROR_DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@postgres_mirror:5432/mtgo_mirror"
|
||||
|
||||
# Redis
|
||||
REDIS_URL: str = "redis://localhost:6379/0"
|
||||
REDIS_URL: str = "redis://redis:6379/0"
|
||||
|
||||
# JWT Configuration
|
||||
JWT_ALGORITHM: str = "HS256"
|
||||
|
||||
Reference in New Issue
Block a user