Files
pulp-console/Dockerfile
Hyemin Lee b24d76ad08 chore: containerize for Coolify + docs (stage 5)
- Dockerfile (python:3.13-slim, uvicorn, 비루트, PORT, /healthz HEALTHCHECK)
- .dockerignore
- README: 로컬/컨테이너/Coolify 배포 + 폐쇄망 wheelhouse 반입 절차
- CLAUDE.md 갱신(현재 구현 상태/라우트/명령/배포), MANUAL.md 추가
- 정적자산은 이미 로컬 동봉(런타임 CDN 0) → 최종 폐쇄망 반입은 의존성 wheelhouse만

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 13:42:28 +09:00

29 lines
1.0 KiB
Docker

# Pulp 패치 관리 콘솔 — Coolify(Dockerfile build pack)용 이미지.
# 빌드 검증: 워크스페이스에서 `podman build -t pulp-console .` (MANUAL §10)
FROM python:3.13-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PORT=8000
WORKDIR /app
# 1) 의존성 (레이어 캐시). 폐쇄망 반입 시 이 단계를 wheelhouse 오프라인 설치로 교체 — README 참고.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 2) 앱 소스 (정적자산·템플릿 포함 — 런타임 CDN 의존 0)
COPY app ./app
# 3) 비루트 실행
RUN useradd --create-home --uid 10001 appuser
USER appuser
EXPOSE 8000
# 라이브니스: /healthz 는 Pulp 와 무관하게 200 (Coolify health check 용)
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD python -c "import os,urllib.request; urllib.request.urlopen('http://127.0.0.1:%s/healthz' % os.environ.get('PORT','8000'))" || exit 1
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}"]