Skip to content

Commit

Permalink
simplify dockerfile
Browse files Browse the repository at this point in the history
Following advice from Nathanael-Mtd
  • Loading branch information
eric-intuitem committed Dec 22, 2024
1 parent eb51461 commit 240f069
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ RUN pip install --upgrade pip && \
RUN poetry install
RUN rm -rf $POETRY_CACHE_DIR

RUN addgroup -g 1001 -S backend && adduser -u 1001 -S -G backend backend
RUN chown -R backend:backend /code/db
USER backend
RUN addgroup -g 1001 -S app && adduser -u 1001 -S -G app app
USER app

ENTRYPOINT ["poetry", "run", "bash", "startup.sh"]
EXPOSE 8000
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ EXPOSE 3000
ENV NODE_ENV=production
ENV BODY_SIZE_LIMIT=20000000

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

CMD [ "node", "server" ]

0 comments on commit 240f069

Please sign in to comment.