Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM node:22.17.0
LABEL author="internxt"

RUN groupadd -r nodeuser && useradd -r -g nodeuser nodeuser
USER nodeuser
ENV YARN_CACHE_FOLDER=/usr/app/.yarn-cache
ENV YARN_GLOBAL_FOLDER=/usr/app/.yarn-global

USER 1234:1234

WORKDIR /usr/app

COPY package.json ./
COPY yarn.lock ./

RUN yarn
COPY --chown=nodeuser:nodeuser . ./
COPY --chown=1234:1234 . ./

RUN yarn build

CMD yarn start:prod
CMD ["sh", "-c", "yarn start:prod"]
11 changes: 7 additions & 4 deletions development.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM node:22.17.0

RUN groupadd -r nodeuser && useradd -r -g nodeuser nodeuser
USER nodeuser
ENV YARN_CACHE_FOLDER=/usr/app/.yarn-cache
ENV YARN_GLOBAL_FOLDER=/usr/app/.yarn-global

USER 1234:1234

WORKDIR /usr/app

COPY package.json ./
COPY yarn.lock ./

RUN yarn
COPY --chown=nodeuser:nodeuser . ./
COPY --chown=1234:1234 . ./

RUN rm -rf dist && yarn build

CMD yarn migrate && yarn start:dev
CMD ["sh", "-c", "yarn migrate && yarn start:dev"]

EXPOSE 3006
Loading