Skip to content

Commit c2a6fe3

Browse files
committed
PPHA-494: Use Dockerfile.dev in development as chainguard cant supoort playwright
1 parent b06d804 commit c2a6fe3

4 files changed

Lines changed: 12 additions & 63 deletions

File tree

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
FROM node:25.2.1-alpine3.21 AS asset_builder
1+
FROM cgr.dev/nhs.net/node:25.2-dev AS asset_builder
22

3+
USER root
34
WORKDIR /app
45

56
COPY package.json package-lock.json rollup.config.js ./
@@ -8,20 +9,22 @@ RUN npm ci
89
RUN npm run compile
910

1011

11-
FROM python:3.14.1-alpine3.21 AS python_base
12+
FROM cgr.dev/nhs.net/python:3.14-dev AS python_base
1213

1314
ENV PYTHONDONTWRITEBYTECODE=1 \
1415
PYTHONUNBUFFERED=1 \
1516
VIRTUAL_ENV=/app/.venv \
1617
PATH="/app/.venv/bin:$PATH" \
1718
USER=app
1819

20+
USER root
1921
RUN addgroup --gid 1000 --system ${USER} \
2022
&& adduser --uid 1000 --system ${USER} --ingroup ${USER}
2123

2224

2325
FROM python_base AS builder
2426

27+
USER root
2528
WORKDIR /app
2629

2730
ENV POETRY_NO_INTERACTION=1 \
@@ -48,4 +51,4 @@ RUN python ./manage.py collectstatic --noinput
4851

4952
EXPOSE 8000
5053

51-
CMD ["/app/.venv/bin/gunicorn", "--bind", "0.0.0.0:8000", "lung_cancer_screening.wsgi"]
54+
ENTRYPOINT ["/app/.venv/bin/gunicorn", "--bind", "0.0.0.0:8000", "lung_cancer_screening.wsgi"]

Dockerfile.chainguard

Lines changed: 0 additions & 54 deletions
This file was deleted.

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ services:
44
web:
55
build:
66
context: .
7-
dockerfile: Dockerfile.chainguard
7+
dockerfile: Dockerfile.dev
88
ports:
99
- "8000:8000"
1010
env_file:
1111
- .env
1212
depends_on:
1313
- db
1414
- asset_builder
15-
# volumes:
16-
# - ./:/app
17-
# - venv:/app/.venv
18-
# - playwright_browsers:/app/browsers
15+
volumes:
16+
- ./:/app
17+
- venv:/app/.venv
18+
- playwright_browsers:/app/browsers
1919
restart: unless-stopped
2020

2121
asset_builder:

makefiles/dev.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ dev-clean:
3232
$(DOCKER_COMPOSE_CMD) system prune -f
3333

3434
dev-lint-fix:
35-
$(DOCKER_COMPOSE_CMD) run --rm web poetry run ruff check --no-cache lung_cancer_screening --fix
35+
$(DOCKER_COMPOSE_CMD) run --rm --entrypoint /app/.venv/bin/ruff web check --no-cache lung_cancer_screening --fix

0 commit comments

Comments
 (0)