# TriplePick — 전체 스택을 한 번에 실행. # db PostgreSQL # api FastAPI (uvicorn) # worker APScheduler (상태전이 · 매일 AI 예측 생성 · 결과 메일) # frontend Vite 빌드 → nginx (정적 + /api 프록시) # # 실행: cp backend/.env.example backend/.env (키 채우기) → docker compose up --build # 접속: http://localhost:8080 services: db: image: postgres:16-alpine environment: POSTGRES_USER: triplepick POSTGRES_PASSWORD: triplepick POSTGRES_DB: triplepick volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U triplepick -d triplepick"] interval: 5s timeout: 5s retries: 10 ports: - "5432:5432" api: build: ./backend env_file: - path: ./backend/.env required: false environment: DATABASE_URL: postgresql+asyncpg://triplepick:triplepick@db:5432/triplepick depends_on: db: condition: service_healthy ports: - "8000:8000" worker: build: ./backend command: ["python", "-m", "app.worker"] env_file: - path: ./backend/.env required: false environment: DATABASE_URL: postgresql+asyncpg://triplepick:triplepick@db:5432/triplepick depends_on: db: condition: service_healthy api: condition: service_started frontend: build: ./frontend depends_on: - api ports: - "8080:80" volumes: pgdata: