diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 28d2d592..a9b2b307 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -41,7 +41,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "poetry" cache-dependency-path: "./backend/poetry.lock" diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 320b5380..076a27c2 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -41,7 +41,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "poetry" cache-dependency-path: "./backend/poetry.lock" diff --git a/backend/Dockerfile b/backend/Dockerfile index af08a453..dec78cdc 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-alpine3.21 +FROM python:3.13-alpine3.21 RUN apk --update add \ build-base \ @@ -25,7 +25,7 @@ WORKDIR /howtheyvote/backend COPY pyproject.toml pyproject.toml COPY poetry.toml poetry.toml COPY poetry.lock poetry.lock -RUN poetry env use python3.12 +RUN poetry env use python3.13 RUN poetry install COPY . . @@ -37,7 +37,9 @@ ENV TZ=UTC ENV ALEMBIC_CONFIG=./howtheyvote/alembic/alembic.ini ENV PATH="/howtheyvote/backend/.venv/bin:$PATH" -# Make Python system packages (such as Xapian) accessible +# Make Python system packages (such as Xapian) accessible. This has to be the same +# as the Python version that can be installed via the Alpine package manager. At +# the time of writing, this is 3.12 on Alpine 3.21. ENV PYTHONPATH=/usr/lib/python3.12/site-packages CMD gunicorn -b [::]:5000 --workers=5 --forwarded-allow-ips=* howtheyvote.wsgi:app