diff --git a/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml b/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml index 49e0c66..a376bf4 100644 --- a/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_language_version: - python: python3.11 + python: python3.12 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: "v4.5.0" diff --git a/{{cookiecutter.project_dirname}}/Dockerfile b/{{cookiecutter.project_dirname}}/Dockerfile index fc1e679..0202be1 100644 --- a/{{cookiecutter.project_dirname}}/Dockerfile +++ b/{{cookiecutter.project_dirname}}/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim-bullseye AS base +FROM python:3.12-slim-bookworm AS base LABEL company="20tab" project="{{ cookiecutter.project_slug }}" service="backend" stage="base" ARG DEBIAN_FRONTEND=noninteractive @@ -8,7 +8,7 @@ WORKDIR $WORKDIR RUN useradd --skel /dev/null --create-home $APPUSER RUN chown $APPUSER:$APPUSER $WORKDIR ENV PATH="/home/${APPUSER}/.local/bin:${PATH}" -ARG PACKAGES_PATH=/home/${APPUSER}/.local/lib/python3.11/site-packages +ARG PACKAGES_PATH=/home/${APPUSER}/.local/lib/python3.12/site-packages RUN apt-get update \ && apt-get install --assume-yes --no-install-recommends \ libpq5 \ @@ -45,7 +45,7 @@ FROM base AS remote LABEL company="20tab" project="{{ cookiecutter.project_slug }}" service="backend" stage="remote" ENV DJANGO_CONFIGURATION=Remote INTERNAL_SERVICE_PORT={{ cookiecutter.internal_service_port }} USER $APPUSER -ARG PACKAGES_PATH=/home/${APPUSER}/.local/lib/python3.11/site-packages +ARG PACKAGES_PATH=/home/${APPUSER}/.local/lib/python3.12/site-packages COPY --chown=$APPUSER ./requirements/remote.txt requirements/remote.txt RUN python3 -m pip install --user --no-cache-dir -r requirements/remote.txt \ && find ${PACKAGES_PATH}/boto*/data/* -maxdepth 0 -type d -not -name s3* -exec rm -rf {} \; || true diff --git a/{{cookiecutter.project_dirname}}/pyproject.toml b/{{cookiecutter.project_dirname}}/pyproject.toml index ddeb42e..d752a90 100644 --- a/{{cookiecutter.project_dirname}}/pyproject.toml +++ b/{{cookiecutter.project_dirname}}/pyproject.toml @@ -1,5 +1,5 @@ [tool.black] -target-version = ["py311"] +target-version = ["py312"] [tool.pytest.ini_options] DJANGO_CONFIGURATION = "Testing" @@ -34,7 +34,7 @@ enable_error_code = [ "truthy-bool", ] ignore_missing_imports = true -python_version = "3.11" +python_version = "3.12" [tool.bandit] exclude_dirs = [ @@ -79,7 +79,7 @@ select = [ "W", "B9" ] -target-version = "py311" +target-version = "py312" [tool.ruff.per-file-ignores] "{{ cookiecutter.django_settings_dirname }}/*sgi.py" = ["E402"]