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:
parent
06f58ca18b
commit
124a91af5a
|
|
@ -7,7 +7,7 @@ services:
|
||||||
POSTGRES_PASSWORD: orchestrator
|
POSTGRES_PASSWORD: orchestrator
|
||||||
POSTGRES_DB: orchestrator
|
POSTGRES_DB: orchestrator
|
||||||
ports:
|
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:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
@ -19,23 +19,20 @@ services:
|
||||||
api:
|
api:
|
||||||
build: .
|
build: .
|
||||||
container_name: orchestrator-api
|
container_name: orchestrator-api
|
||||||
restart: unless-stopped
|
|
||||||
# Bind only to localhost, and use 8100 externally
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8100:8000"
|
- "8000:8000"
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
||||||
DEBUG: "false" # set false in prod
|
DEBUG: "true"
|
||||||
APP_NAME: "LetsBe Orchestrator"
|
APP_NAME: "LetsBe Orchestrator"
|
||||||
# optionally, if your app supports it:
|
|
||||||
# BASE_URL: https://orchestrator.example.com
|
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- ./app:/app/app
|
- ./app:/app/app
|
||||||
- ./alembic:/app/alembic
|
- ./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:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|
@ -7,7 +7,7 @@ services:
|
||||||
POSTGRES_PASSWORD: orchestrator
|
POSTGRES_PASSWORD: orchestrator
|
||||||
POSTGRES_DB: orchestrator
|
POSTGRES_DB: orchestrator
|
||||||
ports:
|
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:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
@ -19,20 +19,23 @@ services:
|
||||||
api:
|
api:
|
||||||
build: .
|
build: .
|
||||||
container_name: orchestrator-api
|
container_name: orchestrator-api
|
||||||
|
restart: unless-stopped
|
||||||
|
# Bind only to localhost, and use 8100 externally
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "127.0.0.1:8100:8000"
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
||||||
DEBUG: "true"
|
DEBUG: "false" # set false in prod
|
||||||
APP_NAME: "LetsBe Orchestrator"
|
APP_NAME: "LetsBe Orchestrator"
|
||||||
|
# optionally, if your app supports it:
|
||||||
|
# BASE_URL: https://orchestrator.example.com
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- ./app:/app/app
|
- ./app:/app/app
|
||||||
- ./alembic:/app/alembic
|
- ./alembic:/app/alembic
|
||||||
- ./tests:/app/tests
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||||
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue