Files
o2o-weather/compose.yaml
T
minaChoi 5e2846ff72 feat: 공유를 비율 고르기 + 공유하기 하나로 줄이고 이미지에 행사 사진·우리 주소 넣기
- 공유 이미지 9:16·4:5·1:1, 위 로고·지역 날짜 / 카드 / 아래 주소 알약 (시안 A)
- 2장 카드는 한 이미지에 묶음, 버튼만 빼고 링크(장소)는 남김
- 웹폰트는 카드 글자에 필요한 조각만 data URL 로 넣어 글꼴이 안 깨지게
- 문구 고르기·링크 복사 제거, 공유하기 한 번에 이미지 + 제목·주소 글
- 행사 사진은 백엔드 /v1/image 가 대신 받음 (IMAGE_PROXY_HOSTS 만 허용)
- 공유 주소는 VITE_SITE_URL 하나로
2026-10-07 15:43:18 +09:00

107 lines
2.6 KiB
YAML

name: o2o-weather
services:
# 운영형: docker compose up --build → http://localhost:8080
frontend:
build:
context: ./frontend
target: prod
args:
# 비우면 같은 주소의 /v1 로 부르고 nginx 가 backend 로 넘긴다
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-}
# 공유할 때 나가는 우리 주소. 비우면 지금 보고 있는 주소
VITE_SITE_URL: ${VITE_SITE_URL:-}
ports:
- "${FRONT_PORT:-8080}:80"
restart: unless-stopped
# 개발형: docker compose --profile dev up --build frontend-dev → http://localhost:5173
frontend-dev:
profiles: ["dev"]
build:
context: ./frontend
target: dev
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- CHOKIDAR_USEPOLLING=true
- VITE_SITE_URL=${VITE_SITE_URL:-}
# 백엔드 API: http://localhost:9810/docs
backend:
build: ./backend
command: ["python", "web_main.py"]
env_file: .env
environment:
PORT: "9800"
DB_HOST: postgres
DB_PORT: "5432"
REDIS_HOST: redis
REDIS_PORT: "6379"
ports:
- "${API_BIND:-9810}:9800"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
# 매일 03:00 스케줄 1개 (포트 없음)
worker:
build: ./backend
command: ["python", "worker_main.py"]
env_file: .env
environment:
DB_HOST: postgres
DB_PORT: "5432"
REDIS_HOST: redis
REDIS_PORT: "6379"
healthcheck:
disable: true
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "${PG_BIND:-5440}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./backend/postgres-init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"]
ports:
- "${REDIS_BIND:-6390}:6379"
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
volumes:
pgdata:
redisdata: