52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-miem_workers}
|
|
POSTGRES_USER: ${POSTGRES_USER:-miem}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-miem_password}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-miem} -d ${POSTGRES_DB:-miem_workers}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build: .
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-miem}:${POSTGRES_PASSWORD:-miem_password}@postgres:5432/${POSTGRES_DB:-miem_workers}
|
|
ports:
|
|
- "127.0.0.1:8000:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
worker:
|
|
build: .
|
|
command: python -m app.worker
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-miem}:${POSTGRES_PASSWORD:-miem_password}@postgres:5432/${POSTGRES_DB:-miem_workers}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
mcp:
|
|
build: .
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-miem}:${POSTGRES_PASSWORD:-miem_password}@postgres:5432/${POSTGRES_DB:-miem_workers}
|
|
ports:
|
|
- "127.0.0.1:8001:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres_data:
|