Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix appuser #12

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading