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

66
docker-compose.yml Normal file
View File

@@ -0,0 +1,66 @@
version: "3.8"
services:
# ── FastAPI 백엔드 ──
api:
build: .
container_name: ev-api
restart: unless-stopped
ports:
- "8000:8000"
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./app:/code/app
- ./dashboard.html:/code/dashboard.html:ro
- ./simulator.html:/code/simulator.html:ro
networks:
- ev-net
# ── PostgreSQL ──
postgres:
image: postgres:16-alpine
container_name: ev-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-ev_charging}
POSTGRES_USER: ${POSTGRES_USER:-evuser}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-evpass1234}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-evuser}"]
interval: 5s
timeout: 3s
retries: 5
networks:
- ev-net
# ── Redis ──
redis:
image: redis:7-alpine
container_name: ev-redis
restart: unless-stopped
ports:
- "6375:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- ev-net
volumes:
pgdata:
networks:
ev-net:
driver: bridge