diff --git a/CHANGELOG.md b/CHANGELOG.md index f4fbde3a..0c040f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ When adding a new entry, please use the following format: ## Log +- [2026-04-01] fix: set explicit home directory for app user to resolve Gunicorn and worker permission issues [#742](https://github.com/jlab-sensing/ENTS-backend/pull/742) - [2026-03-30] fix: added test decorators to resolve lack of "TTN_API_KEY" on fork PR's. removed k6 from github actions. changed github action to utilize env-import.py as opposeed to directly accessing s3 bucket for env variables. [#736] (https://github.com/jlab-sensing/ENTS-backend/pull/736) - [2026-03-23] fix: increase fallback SECRET_KEY length to resolve PyJWT InsecureKeyLengthWarning [#682](https://github.com/jlab-sensing/ENTS-backend/pull/682) - [2026-03-12] fix: safely catch PyJWT DecodeErrors and remove log spam for invalid tokens [#683](https://github.com/jlab-sensing/ENTS-backend/pull/683) diff --git a/backend/Dockerfile b/backend/Dockerfile index fe5526cb..b6cd72ce 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -38,9 +38,11 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt #RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r requirements.txt # create new user and group to run the app with name "app" -RUN adduser --system --group app +# Give the user an explicit home directory OUTSIDE the mounted volume +RUN adduser --system --group --home /home/app app +ENV HOME=/home/app USER app -WORKDIR $HOME +WORKDIR /app # copy files from source tree COPY . .