first commit

This commit is contained in:
2026-03-17 20:59:58 +01:00
commit 8992811486
14 changed files with 1396 additions and 0 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY server.py ./
COPY templates ./templates
COPY static ./static
RUN useradd -m appuser
# Ensure the mounted volume path is writable by the non-root user.
# (docker named volumes are typically owned by root by default)
RUN mkdir -p /data && chown -R appuser:appuser /data
USER appuser
EXPOSE 8000
CMD ["gunicorn", "-b", "0.0.0.0:8000", "server:app", "--workers", "2", "--threads", "4", "--access-logfile", "-", "--error-logfile", "-"]