251a5392ef
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
846 B
Docker
19 lines
846 B
Docker
# B-3 / A-1 Tier 2 (plan crawl-24x7-1) — Playwright 격리 컨테이너.
|
|
# 브라우저 hang/크래시가 fastapi APScheduler 를 잠식하지 않게 별도 서비스로 격리,
|
|
# 타임아웃 있는 HTTP 호출로만 사용. 요청당 브라우저 기동 = 컨텍스트 누적 메모리 차단.
|
|
FROM mcr.microsoft.com/playwright/python:v1.47.0-jammy
|
|
|
|
WORKDIR /srv
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY server.py .
|
|
|
|
# root 로 Chromium 실행 시 sandbox 비활성 강제됨 — 이미지 내장 pwuser(uid 1000)로 실행.
|
|
# /auth ro mount(호스트 hyungi uid 1000, mode 600)도 동일 uid 라 판독 가능.
|
|
USER pwuser
|
|
|
|
# internal-only — compose 네트워크 전용, host 포트 미매핑 (caddy 라우트 금지)
|
|
EXPOSE 3400
|
|
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "3400"]
|