fluxaidemo / Dockerfile
kines9661's picture
Update Dockerfile
20d5b54 verified
raw
history blame contribute delete
554 Bytes
FROM python:3.11-slim
WORKDIR /app
# Koyeb 優化:減少層數
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Koyeb 環境變數
ENV STREAMLIT_SERVER_PORT=$PORT
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Koyeb 健康檢查
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:$PORT/_stcore/health || exit 1
CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0