services: api: build: . command: sh -c "uv run alembic upgrade head && uv run uvicorn app.main:app --host 0.0.0.0 --port 8000" ports: - "8000:8000" env_file: - .env environment: - POSTGRES_HOST=postgres - POSTGRES_PORT=5432 - REDIS_URL=redis://redis:6379/0 - INGEST_ROOTS=["/app/ingest"] volumes: - veditor_data:/app/data - veditor_ingest:/app/ingest depends_on: postgres: condition: service_healthy redis: condition: service_healthy healthcheck: test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health')"] interval: 10s timeout: 5s retries: 3 start_period: 5s restart: unless-stopped worker-light: build: . command: uv run python scripts/run_worker.py light --concurrency 1 --with-scheduler --nice 10 env_file: - .env environment: - POSTGRES_HOST=postgres - POSTGRES_PORT=5432 - REDIS_URL=redis://redis:6379/0 - INGEST_ROOTS=["/app/ingest"] - ENCODER_THREADS=2 volumes: - veditor_data:/app/data - veditor_ingest:/app/ingest depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped worker-heavy: build: . command: uv run python scripts/run_worker.py heavy --concurrency 1 --nice 15 env_file: - .env environment: - POSTGRES_HOST=postgres - POSTGRES_PORT=5432 - REDIS_URL=redis://redis:6379/0 - INGEST_ROOTS=["/app/ingest"] - ENCODER_THREADS=2 volumes: - veditor_data:/app/data - veditor_ingest:/app/ingest depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped postgres: image: postgres:18-alpine restart: unless-stopped env_file: - .env ports: - "127.0.0.1:${POSTGRES_PORT:-5432}:5432" volumes: - postgres_data:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-veditor} -d ${POSTGRES_DB:-veditor}"] interval: 5s timeout: 5s retries: 5 start_period: 10s redis: image: redis:8-alpine restart: unless-stopped command: redis-server --appendonly yes ports: - "127.0.0.1:6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 volumes: veditor_data: veditor_ingest: postgres_data: redis_data: