The results Portal in a Linux container (python 3.13-slim + ODBC Driver 18). PORTAL_SERVER=1: no Start / Stop (the bot runs on the Windows PC). PORTAL_URLS: allowed hosts / origins, Secure cookie when all https. RESULTS_DB_CONN (a SQL login) goes in Dokploy's environment, never here. 71 test files, 1222 tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.3 KiB
Docker
31 lines
1.3 KiB
Docker
# The results Portal on a Linux server (Dokploy, 2026-10-27): Sign-in,
|
|
# Dashboard, Claim status, Runs. The bot runs only on the Windows PC, so
|
|
# PORTAL_SERVER=1 turns Start / Stop off. Set RESULTS_DB_CONN (a SQL login)
|
|
# and PORTAL_URLS in Dokploy's environment — never in Git (.env.example).
|
|
FROM python:3.13-slim-bookworm
|
|
|
|
# Microsoft ODBC Driver 18 for SQL Server, for pyodbc.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl gnupg ca-certificates \
|
|
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
|
|
| gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \
|
|
&& curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list \
|
|
-o /etc/apt/sources.list.d/mssql-release.list \
|
|
&& apt-get update \
|
|
&& ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 \
|
|
&& apt-get purge -y curl gnupg && apt-get autoremove -y \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
COPY requirements-portal.txt .
|
|
RUN pip install --no-cache-dir -r requirements-portal.txt
|
|
COPY src ./src
|
|
COPY web ./web
|
|
|
|
RUN useradd --create-home portal
|
|
USER portal
|
|
ENV PORTAL_SERVER=1 PYTHONUNBUFFERED=1
|
|
EXPOSE 8000
|
|
CMD ["python", "-m", "uvicorn", "web.app:app", "--host", "0.0.0.0", \
|
|
"--port", "8000", "--proxy-headers", "--forwarded-allow-ips", "*"]
|