FROM node:20-slim | |
RUN mkdir -p /home/node/app && chown -R node:node /home/node/app \ | |
&& mkdir -p /data && chown -R node:node /data | |
WORKDIR /home/node/app | |
COPY --chown=node:node package*.json ./ | |
USER node | |
RUN npm install | |
COPY --chown=node:node ./src ./src | |
EXPOSE 4000 | |
CMD [ "node", "src/index.js" ] | |