Skip to content

Commit 5d31c36

Browse files
committed
Put playwright browsers somewhere writeable
1 parent e638554 commit 5d31c36

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,15 @@ RUN apt-get update && apt-get install -y \
8080
ENV POETRY_NO_INTERACTION=1 \
8181
POETRY_VIRTUALENVS_IN_PROJECT=1 \
8282
POETRY_VIRTUALENVS_CREATE=1 \
83-
POETRY_CACHE_DIR=/tmp/poetry_cache
83+
POETRY_CACHE_DIR=/tmp/poetry_cache \
84+
PLAYWRIGHT_BROWSERS_PATH=/app/browsers
8485

8586
COPY pyproject.toml poetry.lock ./
8687
RUN pip install poetry
8788
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR
89+
90+
# Install playwright browsers
91+
RUN mkdir -p /app/browsers && chown -R app:app /app/browsers
8892
RUN poetry run playwright install --with-deps chromium
8993

9094
USER ${USER}

makefiles/dev.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dev-logs:
1818
$(DOCKER_COMPOSE_CMD) logs -f
1919

2020
dev-shell:
21-
$(DOCKER_COMPOSE_CMD) run web bash
21+
$(DOCKER_COMPOSE_CMD) run --rm web bash
2222

2323
dev-migrate:
2424
$(DOCKER_COMPOSE_CMD) run --rm web python manage.py migrate

0 commit comments

Comments
 (0)