fix: create home for the new user during Dockerfile building

This commit is contained in:
Hang
2026-08-24 00:40:32 +01:00
parent 73affa94e7
commit eceb9126f0
2 changed files with 4 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ DJANGO_ALLOWED_HOSTS=
DOMAIN=
SESSION_COOKIE_SECURE_ENABLED=true
CSRF_COOKIE_SECURE_ENABLED=true
FORUM_WEBHOOK_SECRET=
DATABASE_ENGINE=postgresql
DATABASE_NAME=rigs

View File

@@ -40,7 +40,9 @@ RUN uv run python manage.py collectstatic --noinput
FROM python:3.12-slim-trixie
RUN addgroup --system app \
&& adduser --system --group app
&& adduser --system --group --home /home/app app \
&& mkdir -p /home/app \
&& chown app:app /home/app
COPY --from=builder --chown=app:app /app /app
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 \