krz/hutch-stats

Server-side utility for calculating contributions for sourcehut users. contributions server sourcehut stats

Commit b3bfd597d7

b3bfd597d7b3fd42a8b7bce965305348509d4438

parent: 1878dff520

Verified · cmc

cmc <hello@cleberg.net> · 2026-04-11 17:34 UTC

add Dockerfile

Layout: unified · split

Dockerfile added +21
@@ -0,0 +1,21 @@
1FROM python:3.12-slim
2
3ENV PYTHONDONTWRITEBYTECODE=1
4ENV PYTHONUNBUFFERED=1
5ENV PIP_NO_CACHE_DIR=1
6ENV DATABASE_URL=sqlite:////data/srht_contrib.db
7
8WORKDIR /app
9
10RUN mkdir -p /data
11
12COPY pyproject.toml README.md alembic.ini ./
13COPY alembic ./alembic
14COPY src ./src
15
16RUN python -m pip install --upgrade pip && \
17 python -m pip install .
18
19EXPOSE 8000
20
21CMD ["sh", "-c", "alembic upgrade head && uvicorn srht_contrib.main:app --host 0.0.0.0 --port 8000"]