Skip to content

Commit

Permalink
Fix appuser (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii authored Sep 13, 2024
1 parent d42316a commit 2c396b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ RUN apt-get update && apt-get install -y postgresql

RUN useradd -m appuser

USER appuser

ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:$PATH"

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ push:
docker push $(IMAGE_NAME)

tests-docker: build
docker run --env-file .env --rm $(IMAGE_NAME) pytest tests
# Run as appuser because Postgres won't allow execution as root at any costs.
docker run --env-file .env --rm --user appuser $(IMAGE_NAME) pytest tests

0 comments on commit 2c396b4

Please sign in to comment.