38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
# TriplePick — 외부 PostgreSQL 에 연결하는 구성 (로컬 db 컨테이너 없음).
|
|
# api FastAPI (uvicorn)
|
|
# worker APScheduler (상태전이 · 매일 AI 예측 생성 · 결과 메일)
|
|
# frontend Vite 빌드 → nginx (정적 + /api 프록시)
|
|
#
|
|
# DB 는 이미 떠 있는 외부 PostgreSQL(예: 172.30.1.36:5432)에 연결한다.
|
|
# backend/.env 에 DB_HOST/DB_PORT/DB_NAME/DB_USER/DB_PASSWORD 를 채우면
|
|
# app 이 접속 URL 을 조합해 그 DB 에 스키마(테이블)를 생성한다.
|
|
#
|
|
# 실행: cp backend/.env.example backend/.env (DB·키 채우기) → docker compose up --build
|
|
# 접속: http://localhost:8080
|
|
|
|
services:
|
|
api:
|
|
build: ./backend
|
|
env_file:
|
|
- path: ./backend/.env
|
|
required: false
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
worker:
|
|
build: ./backend
|
|
command: ["python", "-m", "app.worker"]
|
|
env_file:
|
|
- path: ./backend/.env
|
|
required: false
|
|
depends_on:
|
|
api:
|
|
condition: service_started
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
depends_on:
|
|
- api
|
|
ports:
|
|
- "8080:80"
|