krz/hutch-stats
Server-side utility for calculating contributions for sourcehut users.
clone: git clone https://gitbay.org/krz/hutch-stats.git
b3bfd597d7b3fd42a8b7bce965305348509d4438
verified · cmc
author: Christian Cleberg <hello@cleberg.net> · 2026-04-11T17:34:43Z
Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) new file mode 100644 @@ -0,0 +1,21 @@ +FROM python:3.12-slim + +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +ENV PIP_NO_CACHE_DIR=1 +ENV DATABASE_URL=sqlite:////data/srht_contrib.db + +WORKDIR /app + +RUN mkdir -p /data + +COPY pyproject.toml README.md alembic.ini ./ +COPY alembic ./alembic +COPY src ./src + +RUN python -m pip install --upgrade pip && \ + python -m pip install . + +EXPOSE 8000 + +CMD ["sh", "-c", "alembic upgrade head && uvicorn srht_contrib.main:app --host 0.0.0.0 --port 8000"]