refactor: reorganize Docker Compose for dev/prod separation

- docker-compose.yml: production config (localhost binding, no reload)
- docker-compose-dev.yml: development config (hot reload, debug mode)
- Remove docker-compose-production.yml (consolidated into main file)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Matt 2025-12-04 14:08:44 +01:00
parent 06f58ca18b
commit 124a91af5a
2 changed files with 13 additions and 13 deletions

View File

@ -7,7 +7,7 @@ services:
POSTGRES_PASSWORD: orchestrator
POSTGRES_DB: orchestrator
ports:
- "5433:5432" # OK to leave; remove if you don't need host access
- "5433:5432" # Host port 5433 to avoid conflict with existing Postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
@ -19,23 +19,20 @@ services:
api:
build: .
container_name: orchestrator-api
restart: unless-stopped
# Bind only to localhost, and use 8100 externally
ports:
- "127.0.0.1:8100:8000"
- "8000:8000"
environment:
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
DEBUG: "false" # set false in prod
DEBUG: "true"
APP_NAME: "LetsBe Orchestrator"
# optionally, if your app supports it:
# BASE_URL: https://orchestrator.example.com
depends_on:
db:
condition: service_healthy
volumes:
- ./app:/app/app
- ./alembic:/app/alembic
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
- ./tests:/app/tests
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
volumes:
postgres_data:

View File

@ -7,7 +7,7 @@ services:
POSTGRES_PASSWORD: orchestrator
POSTGRES_DB: orchestrator
ports:
- "5433:5432" # Host port 5433 to avoid conflict with existing Postgres
- "5433:5432" # OK to leave; remove if you don't need host access
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
@ -19,20 +19,23 @@ services:
api:
build: .
container_name: orchestrator-api
restart: unless-stopped
# Bind only to localhost, and use 8100 externally
ports:
- "8000:8000"
- "127.0.0.1:8100:8000"
environment:
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
DEBUG: "true"
DEBUG: "false" # set false in prod
APP_NAME: "LetsBe Orchestrator"
# optionally, if your app supports it:
# BASE_URL: https://orchestrator.example.com
depends_on:
db:
condition: service_healthy
volumes:
- ./app:/app/app
- ./alembic:/app/alembic
- ./tests:/app/tests
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
volumes:
postgres_data: