feat: Docker 패키징 (로컬 테스트 + 홈서버 배포)
- Dockerfile: python:3.12-slim 베이스, headless streamlit - docker-compose.yml: ADMIN_TOKEN 환경변수, votes.db 영속 볼륨, participants.json read-only mount - .dockerignore: 빌드 컨텍스트 최소화 테스트: - docker compose build OK - 컨테이너 실행 후 http://localhost:8501 200 OK 확인 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app.py assign_teams.py ./
|
||||
COPY participants.json ./
|
||||
|
||||
EXPOSE 8501
|
||||
|
||||
ENV VOTE_DB=/data/votes.db \
|
||||
PARTICIPANTS=/app/participants.json
|
||||
|
||||
CMD ["streamlit", "run", "app.py", \
|
||||
"--server.address=0.0.0.0", \
|
||||
"--server.port=8501", \
|
||||
"--server.headless=true", \
|
||||
"--browser.gatherUsageStats=false"]
|
||||
Reference in New Issue
Block a user