name: open-playlist-engine services: postgres: # Major upgrades require pg_upgrade and may change the image's volume layout. image: postgres:18-alpine restart: unless-stopped environment: POSTGRES_USER: ope POSTGRES_PASSWORD: ope POSTGRES_DB: ope volumes: - pgdata18:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "psql -U ope -d ope -c 'SELECT 1' >/dev/null"] interval: 5s timeout: 3s retries: 10 valkey: image: valkey/valkey:9-alpine restart: unless-stopped healthcheck: test: ["CMD", "valkey-cli", "ping"] interval: 5s timeout: 3s retries: 10 ollama: image: ollama/ollama:0.40.3 profiles: ["generator"] ports: - "11434:11434" volumes: - ollama:/root/.ollama healthcheck: test: ["CMD", "ollama", "list"] interval: 10s timeout: 5s retries: 12 backend: build: ./backend restart: unless-stopped command: ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --no-access-log"] env_file: .env environment: OPE_DATABASE_URL: postgresql+psycopg://ope:ope@postgres:5432/ope OPE_VALKEY_URL: redis://valkey:6379/0 OPE_SNAPSHOT_DIR: /data/snapshots volumes: - snapshots:/data/snapshots ports: - "127.0.0.1:8000:8000" depends_on: postgres: condition: service_healthy valkey: condition: service_healthy worker: build: ./backend restart: unless-stopped command: ["sh", "-c", "alembic upgrade head && arq app.jobs.worker.WorkerSettings"] env_file: .env environment: OPE_DATABASE_URL: postgresql+psycopg://ope:ope@postgres:5432/ope OPE_VALKEY_URL: redis://valkey:6379/0 OPE_SNAPSHOT_DIR: /data/snapshots volumes: - snapshots:/data/snapshots depends_on: backend: condition: service_started valkey: condition: service_healthy frontend: build: ./frontend restart: unless-stopped ports: - "8080:80" depends_on: backend: condition: service_started volumes: pgdata18: snapshots: ollama: