From 35c725d27684ee6470232544fb12de8659712fb6 Mon Sep 17 00:00:00 2001 From: ismail Date: Tue, 12 May 2026 00:03:06 +0300 Subject: [PATCH] fix: add appuser home dir in Dockerfile, allow localhost in ALLOWED_HOSTS for healthcheck --- Dockerfile | 2 +- config/settings/prod.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2142884..00aba74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ARG UID=1000 -RUN groupadd -g ${UID} -r appuser && useradd -u ${UID} -r -g appuser appuser +RUN groupadd -g ${UID} -r appuser && useradd -u ${UID} -r -g appuser -m appuser COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages COPY --from=builder /usr/local/bin /usr/local/bin diff --git a/config/settings/prod.py b/config/settings/prod.py index 79a8140..05fed8a 100644 --- a/config/settings/prod.py +++ b/config/settings/prod.py @@ -14,7 +14,7 @@ SECURE_HSTS_SECONDS = 31536000 # 1 year SECURE_HSTS_INCLUDE_SUBDOMAINS = True SECURE_HSTS_PRELOAD = True -ALLOWED_HOSTS = env.list('ALLOWED_HOSTS') +ALLOWED_HOSTS = env.list('ALLOWED_HOSTS', default=[]) + ['localhost', '127.0.0.1'] DATABASES = { 'default': env.db('DATABASE_URL')