docker compose 수정 ,

This commit is contained in:
HyeongBaeYang committed 2026-06-10 15:23:05 +09:00
1 parent 1a803b7fa0
commit dc50fc6d8c
4 files changed
+42 -35

No files matched your search

+6 -31
View File
@@ -1,39 +1,21 @@
# TriplePick — 전체 스택을 한 번에 실행.
# db PostgreSQL
# TriplePick — 외부 PostgreSQL 에 연결하는 구성 (로컬 db 컨테이너 없음).
# api FastAPI (uvicorn)
# worker APScheduler (상태전이 · 매일 AI 예측 생성 · 결과 메일)
# frontend Vite 빌드 → nginx (정적 + /api 프록시)
#
# 실행: cp backend/.env.example backend/.env (키 채우기) → docker compose up --build
# 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:
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"
@@ -43,11 +25,7 @@ services:
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
@@ -57,6 +35,3 @@ services:
- api
ports:
- "8080:80"
volumes:
pgdata: