feat(ghbot): add deploy and dockerfile

This commit is contained in:
zkldi
2022-09-28 22:33:26 +01:00
parent 7f8530ac6d
commit fa7f8d5e08
2 changed files with 66 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
FROM node:16 as build
WORKDIR /app
COPY --chown=node:node . /app
RUN npm install --silent -g pnpm@6 && groupmod -g 1003 node && chown node:node /app
USER node
RUN pnpm install --silent && pnpm build && pnpm prune --silent --production && pnpm store prune --silent
HEALTHCHECK --interval=15s --timeout=5s CMD curl -f http://localhost:8080 || exit 1
ENV NODE_PATH=js/
CMD ["node", "js/main.js"]