Skip to content

Commit

Permalink
chore: docker uid, gid
Browse files Browse the repository at this point in the history
  • Loading branch information
fivehanz committed Aug 4, 2024
1 parent 56a0334 commit 2ba6ba2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ARG UID=1000
ARG GID=1000

FROM python:3.11-slim-bookworm AS python-base

ENV PYTHONUNBUFFERED=1 \
Expand Down Expand Up @@ -38,6 +35,9 @@ RUN poetry install --no-dev && poetry add granian==1.5.2 && poetry cache clear .
############################################################
FROM python-base AS production

ENV GID=1000
ENV UID=1000

RUN groupadd -g $GID wagtail && \
useradd -m -u $UID -g $GID wagtail

Expand Down
4 changes: 4 additions & 0 deletions deployment/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ services:
- DATABASE_URL=postgres://user:dbpassword@db:5432/hanz-db
- REDIS_URL=redis://redis:6379/1
- RUN_MIGRATION=true
- UID=${UID:-1000}
- GID=${GID:-1000}
env_file:
- .env
command: "granian --interface wsgi hanz.wsgi:application --host 0.0.0.0 --port 8000 \
Expand All @@ -34,6 +36,8 @@ services:
environment:
- DATABASE_URL=postgres://user:dbpassword@db:5432/hanz-db
- REDIS_URL=redis://redis:6379/1
- UID=${UID:-1000}
- GID=${GID:-1000}
env_file:
- .env
volumes:
Expand Down

0 comments on commit 2ba6ba2

Please sign in to comment.