Skip to content

Commit

Permalink
Revert non-root docker user until further rework
Browse files Browse the repository at this point in the history
multiple collisions to fix first
  • Loading branch information
ab-smith committed Dec 30, 2024
1 parent 8301cd9 commit 8f64a1f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ RUN pip install --upgrade pip && \
RUN poetry install
RUN rm -rf $POETRY_CACHE_DIR

RUN addgroup -g 1001 -S app && adduser -u 1001 -S -G app app
USER app

ENTRYPOINT ["poetry", "run", "bash", "startup.sh"]
EXPOSE 8000
2 changes: 1 addition & 1 deletion backend/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi

if [ ! -n "$DJANGO_SECRET_KEY" ]; then
if [ ! -f db/django_secret_key ]; then
install -m 600 <(cat /proc/sys/kernel/random/uuid) db/django_secret_key
cat /proc/sys/kernel/random/uuid >db/django_secret_key
echo "generating initial Django secret key"
fi
export DJANGO_SECRET_KEY=$(<db/django_secret_key)
Expand Down
2 changes: 0 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ EXPOSE 3000
ENV NODE_ENV=production
ENV BODY_SIZE_LIMIT=20000000

RUN addgroup -g 1001 -S app && adduser -u 1001 -S -G app app
USER app

CMD [ "node", "server" ]

0 comments on commit 8f64a1f

Please sign in to comment.