Files
ev-charger-as/docker-compose.yml
2026-04-18 06:18:58 +09:00

57 lines
1.5 KiB
YAML

version: '3.8'
# -------------------------------------------------------
# Orange Pi 5 전용 구성
# SSL/DNS/인증서는 외부 서버(5825u)에서 처리
# 이 서버는 192.168.0.114:5700 으로만 서비스
# -------------------------------------------------------
services:
nginx:
image: nginx:alpine
container_name: ev_nginx
ports:
- "5700:80" # 외부 접근 포트: 192.168.0.114:5700
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./frontend/static:/var/www/html:ro
- ./uploads:/var/www/uploads:ro
depends_on:
- backend
restart: unless-stopped
backend:
build: ./backend
container_name: ev_backend
environment:
- DATABASE_URL=${DATABASE_URL}
- SECRET_KEY=${SECRET_KEY}
- UPLOAD_DIR=/uploads
- DOMAIN=${DOMAIN}
volumes:
- ./uploads:/uploads
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:15-alpine
container_name: ev_db
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/init_db.sql:/docker-entrypoint-initdb.d/init_db.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
volumes:
postgres_data: