ImageProcessor_MainServer/README.prod-main.md

612 B

FastAPI 메인 서버 (Production)

운영 환경 최소 구성: FastAPI + Redis (+ 선택: Nginx TLS proxy)

배포 예시

cp .env.prod.example .env.prod
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d --scale fastapi=2
curl -f https://api.example.com/health

Gunicorn 설정

workers = 4
worker_class = "uvicorn.workers.UvicornWorker"
max_requests = 5000
max_requests_jitter = 500

보안 체크리스트

  • Redis 외부 차단 + requirepass
  • /health 에는 내부 상태 노출 금지
  • HTTPS termination (Nginx / LB)