EV 충전 플랫폼 초기 백업

This commit is contained in:
root
2026-04-18 05:59:31 +09:00
commit 4558ac10c0
40 changed files with 6246 additions and 0 deletions

63
nginx_fastapi.conf Normal file
View File

@@ -0,0 +1,63 @@
# ─────────────────────────────────────────────
# Nginx 설정 — 기존 Steve + FastAPI 통합
#
# 기존 s1.byunc.com Nginx 설정에 아래 블록 추가.
# Steve와 FastAPI를 같은 도메인에서 path로 분기.
# ─────────────────────────────────────────────
# ── upstream 정의 ──
upstream fastapi_backend {
server 127.0.0.1:8000;
}
# server 블록 내부에 아래 location 추가:
# ── FastAPI API ──
location /api/ {
proxy_pass http://fastapi_backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 60s;
}
# ── FastAPI Docs (Swagger UI) ──
location /docs {
proxy_pass http://fastapi_backend;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /redoc {
proxy_pass http://fastapi_backend;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /openapi.json {
proxy_pass http://fastapi_backend;
}
# ── 헬스체크 ──
location /health {
proxy_pass http://fastapi_backend;
}
# ── 관리자 대시보드 ──
location = /dashboard {
alias /home/byun/ev-charging-backend/dashboard.html;
default_type text/html;
}
# ── 충전 페이지 (QR 스캔 진입점) ──
# 프론트 배포 후 정적 파일 서빙 또는 SPA로 교체
location /charge/ {
proxy_pass http://fastapi_backend;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
# ── 기존 Steve 설정 (유지) ──
# location /steve/ { ... }
# location /steve/websocket/ { ... }