diff --git a/docker-compose-production.yml b/docker-compose-dev.yml similarity index 67% rename from docker-compose-production.yml rename to docker-compose-dev.yml index 4cb326a..159276d 100644 --- a/docker-compose-production.yml +++ b/docker-compose-dev.yml @@ -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: diff --git a/docker-compose.yml b/docker-compose.yml index 159276d..4cb326a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: