From 81139086c9068f9599e81f64bba7ee8b11b0a3f0 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 15 Aug 2026 13:19:52 +0200 Subject: [PATCH 1/6] Local env image updates --- .github/workflows/ai-code-review.yml | 2 +- .github/workflows/backend-checks.yml | 2 +- .github/workflows/backend-test.yml | 2 +- .github/workflows/claude.yml | 2 +- .github/workflows/graphql-schema.yml | 2 +- Dockerfile.python.local | 2 +- backend/Dockerfile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index 3a4c3a9d6a..8976272fa4 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -27,7 +27,7 @@ jobs: uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b id: setup-uv with: - version: "0.5.5" + version: "0.12.5" enable-cache: true - name: Find existing Claude bot comment id: find-comment diff --git a/.github/workflows/backend-checks.yml b/.github/workflows/backend-checks.yml index de33fe357f..f0019bf877 100644 --- a/.github/workflows/backend-checks.yml +++ b/.github/workflows/backend-checks.yml @@ -23,7 +23,7 @@ jobs: uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b id: setup-uv with: - version: "0.5.5" + version: "0.12.5" enable-cache: true - name: Install python dependencies diff --git a/.github/workflows/backend-test.yml b/.github/workflows/backend-test.yml index 4ff391464d..4c4651834c 100644 --- a/.github/workflows/backend-test.yml +++ b/.github/workflows/backend-test.yml @@ -43,7 +43,7 @@ jobs: uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b id: setup-uv with: - version: "0.5.5" + version: "0.12.5" enable-cache: true - run: pip install codecov diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index b00feb72b7..e8685a9798 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -37,7 +37,7 @@ jobs: uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b id: setup-uv with: - version: "0.5.5" + version: "0.12.5" enable-cache: true - name: Run Claude uses: anthropics/claude-code-action@v1 diff --git a/.github/workflows/graphql-schema.yml b/.github/workflows/graphql-schema.yml index fef0d214cf..ef4d8d6232 100644 --- a/.github/workflows/graphql-schema.yml +++ b/.github/workflows/graphql-schema.yml @@ -27,7 +27,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b with: - version: "0.5.5" + version: "0.12.5" enable-cache: true - name: Install dependencies diff --git a/Dockerfile.python.local b/Dockerfile.python.local index 023fe04fb2..da18e9403b 100644 --- a/Dockerfile.python.local +++ b/Dockerfile.python.local @@ -9,7 +9,7 @@ ARG FUNCTION_DIR RUN mkdir -p ${FUNCTION_DIR} WORKDIR ${FUNCTION_DIR} -RUN pip install uv==0.5.5 +COPY --from=ghcr.io/astral-sh/uv:0.12.5 /uv /uvx /usr/local/bin/ RUN mkdir -p ${FUNCTION_DIR}/assets diff --git a/backend/Dockerfile b/backend/Dockerfile index 8b3e37c761..e2f42a1439 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -30,7 +30,7 @@ RUN apt-get update -y && apt-get install -y \ RUN mkdir -p ${FUNCTION_DIR} WORKDIR ${FUNCTION_DIR} -RUN pip install uv==0.5.5 +COPY --from=ghcr.io/astral-sh/uv:0.12.5 /uv /uvx /usr/local/bin/ COPY pyproject.toml uv.lock ./ From 3e74f07bcc9bc8ffc037721ec1b9824ae6d0e4eb Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 15 Aug 2026 13:41:21 +0200 Subject: [PATCH 2/6] Path --- Dockerfile.python.local | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.python.local b/Dockerfile.python.local index da18e9403b..b2457963ac 100644 --- a/Dockerfile.python.local +++ b/Dockerfile.python.local @@ -10,6 +10,8 @@ RUN mkdir -p ${FUNCTION_DIR} WORKDIR ${FUNCTION_DIR} COPY --from=ghcr.io/astral-sh/uv:0.12.5 /uv /uvx /usr/local/bin/ +ENV UV_PROJECT_ENVIRONMENT=/opt/venv +ENV PATH="/opt/venv/bin:${PATH}" RUN mkdir -p ${FUNCTION_DIR}/assets From 9e3e9f858cfd169988126ca458480d2a0d0f0c4b Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 15 Aug 2026 13:45:48 +0200 Subject: [PATCH 3/6] changes --- backend/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index e2f42a1439..81833e42e6 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -24,13 +24,13 @@ FROM base AS build-stage ARG FUNCTION_DIR -RUN apt-get update -y && apt-get install -y \ - gcc git +RUN apt-get update -y && apt-get install -y gcc git RUN mkdir -p ${FUNCTION_DIR} WORKDIR ${FUNCTION_DIR} COPY --from=ghcr.io/astral-sh/uv:0.12.5 /uv /uvx /usr/local/bin/ +ENV UV_PROJECT_ENVIRONMENT=/opt/venv COPY pyproject.toml uv.lock ./ @@ -81,11 +81,14 @@ ENV NLTK_DATA=/home/app/nltk_data COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/ COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/widgets/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/widgets/ COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/_astro ${FUNCTION_DIR}/custom_admin/static/_astro/ -COPY --chown=app:app --from=build-stage ${FUNCTION_DIR}/.venv ${FUNCTION_DIR}/.venv +COPY --chown=app:app --from=build-stage /opt/venv /opt/venv COPY --chown=app:app . ${FUNCTION_DIR} COPY ./entrypoint.sh /entrypoint.sh +ENV UV_PROJECT_ENVIRONMENT=/opt/venv +ENV PATH="/opt/venv/bin:${PATH}" + RUN mkdir -p assets && .venv/bin/python manage.py collectstatic --noinput ENV PGSSLCERT=/tmp/postgresql.crt From d5059cfce7277fb259e2da13dabf029381f3c74c Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 15 Aug 2026 13:54:38 +0200 Subject: [PATCH 4/6] ch --- backend/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 81833e42e6..3af0515d2e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -31,6 +31,7 @@ WORKDIR ${FUNCTION_DIR} COPY --from=ghcr.io/astral-sh/uv:0.12.5 /uv /uvx /usr/local/bin/ ENV UV_PROJECT_ENVIRONMENT=/opt/venv +ENV PATH="/opt/venv/bin:${PATH}" COPY pyproject.toml uv.lock ./ @@ -38,7 +39,7 @@ RUN uv sync --no-dev COPY . ./ -RUN .venv/bin/python manage.py graphql_schema +RUN python manage.py graphql_schema # Build custom admin components @@ -89,7 +90,7 @@ COPY ./entrypoint.sh /entrypoint.sh ENV UV_PROJECT_ENVIRONMENT=/opt/venv ENV PATH="/opt/venv/bin:${PATH}" -RUN mkdir -p assets && .venv/bin/python manage.py collectstatic --noinput +RUN mkdir -p assets && python manage.py collectstatic --noinput ENV PGSSLCERT=/tmp/postgresql.crt From 65d43df546500937d9551fef3ca61c266ec7c919 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 15 Aug 2026 14:17:50 +0200 Subject: [PATCH 5/6] changes --- infrastructure/applications/pycon_backend/web_task.tf | 2 +- infrastructure/applications/pycon_backend/worker.tf | 6 +++--- .../applications/pycon_backend/worker_heavy_processing.tf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infrastructure/applications/pycon_backend/web_task.tf b/infrastructure/applications/pycon_backend/web_task.tf index 9deabf302e..62df88c44f 100644 --- a/infrastructure/applications/pycon_backend/web_task.tf +++ b/infrastructure/applications/pycon_backend/web_task.tf @@ -9,7 +9,7 @@ resource "aws_ecs_task_definition" "web" { essential = true command = [ - "/home/app/.venv/bin/gunicorn", "-w", "5", "-b", "0.0.0.0:8000", "pycon.wsgi" + "gunicorn", "-w", "5", "-b", "0.0.0.0:8000", "pycon.wsgi" ] dockerLabels = { diff --git a/infrastructure/applications/pycon_backend/worker.tf b/infrastructure/applications/pycon_backend/worker.tf index 180b812047..897cbb8b57 100644 --- a/infrastructure/applications/pycon_backend/worker.tf +++ b/infrastructure/applications/pycon_backend/worker.tf @@ -220,7 +220,7 @@ resource "aws_ecs_task_definition" "worker" { essential = true command = [ - "/home/app/.venv/bin/celery", "-A", "pycon", "worker", "-l", "info", "-E" + "bin/celery", "-A", "pycon", "worker", "-l", "info", "-E" ] environment = local.env_vars @@ -261,7 +261,7 @@ resource "aws_ecs_task_definition" "worker" { essential = false command = [ - "/home/app/.venv/bin/python", "manage.py", "migrate" + "bin/python", "manage.py", "migrate" ] environment = local.env_vars @@ -312,7 +312,7 @@ resource "aws_ecs_task_definition" "beat" { essential = true command = [ - "/home/app/.venv/bin/celery", "-A", "pycon", "beat", "-l", "info" + "bin/celery", "-A", "pycon", "beat", "-l", "info" ] environment = local.env_vars diff --git a/infrastructure/applications/pycon_backend/worker_heavy_processing.tf b/infrastructure/applications/pycon_backend/worker_heavy_processing.tf index e4596a09f0..6d0cc7348a 100644 --- a/infrastructure/applications/pycon_backend/worker_heavy_processing.tf +++ b/infrastructure/applications/pycon_backend/worker_heavy_processing.tf @@ -24,7 +24,7 @@ resource "aws_ecs_task_definition" "heavy_processing_worker" { essential = true command = [ - "/home/app/.venv/bin/celery", "-A", "pycon", "worker", "-l", "info", "-Q", "heavy_processing", "--hostname", "heavyprocessing@%h", "-E" + "celery", "-A", "pycon", "worker", "-l", "info", "-Q", "heavy_processing", "--hostname", "heavyprocessing@%h", "-E" ] environment = local.env_vars From 68aa79303f68cd26a09c4986fdb56f9acbe05a08 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 15 Aug 2026 14:24:40 +0200 Subject: [PATCH 6/6] typo --- infrastructure/applications/pycon_backend/worker.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/applications/pycon_backend/worker.tf b/infrastructure/applications/pycon_backend/worker.tf index 897cbb8b57..b691ddfc0b 100644 --- a/infrastructure/applications/pycon_backend/worker.tf +++ b/infrastructure/applications/pycon_backend/worker.tf @@ -220,7 +220,7 @@ resource "aws_ecs_task_definition" "worker" { essential = true command = [ - "bin/celery", "-A", "pycon", "worker", "-l", "info", "-E" + "celery", "-A", "pycon", "worker", "-l", "info", "-E" ] environment = local.env_vars @@ -312,7 +312,7 @@ resource "aws_ecs_task_definition" "beat" { essential = true command = [ - "bin/celery", "-A", "pycon", "beat", "-l", "info" + "celery", "-A", "pycon", "beat", "-l", "info" ] environment = local.env_vars