diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f7710a5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:18 + +RUN mkdir -p /home/node/app \ + && chown -R node:node /home/node/app + +WORKDIR /home/node/app + +ENV NODE_ENV=production + +EXPOSE 3000 + +USER node + +COPY --chown=node:node package.json /home/node/app/package.json +COPY --chown=node:node yarn.lock /home/node/app/yarn.lock +COPY --chown=node:node dist /home/node/app/dist + +RUN yarn install + +CMD ["node", "dist/src/index.js"]