Streamlit + VectorBT dashboard, Parquet harvester with nightly cron, Authentik header auth, SQLite strategy persistence, and Bugsink telemetry. Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
887 B
Docker
31 lines
887 B
Docker
FROM python:3.11-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
PARQUET_DIR=/data/parquet \
|
|
STRATEGY_DB_PATH=/data/strategies/strategies.db
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends bash curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY telemetry.py auth.py strategy_db.py backtest.py app.py sync.py ./
|
|
COPY .streamlit /app/.streamlit
|
|
|
|
EXPOSE 8501
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
|
CMD curl -sf http://127.0.0.1:8501/_stcore/health || exit 1
|
|
|
|
CMD ["streamlit", "run", "app.py", \
|
|
"--server.port=8501", \
|
|
"--server.address=0.0.0.0", \
|
|
"--browser.gatherUsageStats=false", \
|
|
"--server.enableCORS=false", \
|
|
"--server.enableXsrfProtection=false"]
|