New version of this thing
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Fabian Stamm
2023-04-26 00:04:56 +02:00
parent 422ebd0703
commit 9dfb1342e5
16 changed files with 2462 additions and 265 deletions

View File

@ -1,21 +1,29 @@
FROM node:19
FROM node:19 as builder
RUN mkdir -p /app
WORKDIR /app
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "/app/"]
COPY ["src", "/app/src"]
RUN yarn install
RUN yarn build
FROM node:19
LABEL maintainer="Fabian Stamm <dev@fabianstamm.de>"
RUN apt-get update
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN mkdir -p /app
WORKDIR /app
ENV NODE_ENV=production
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "/usr/src/app/"]
COPY ".yarn" /usr/src/app/.yarn
RUN yarn install
COPY lib/ /usr/src/app/lib
COPY --from=builder lib/ /app/lib
VOLUME [ "/usr/src/app/logs", "/usr/src/app/persist"]
VOLUME [ "/app/logs", "/app/persist"]
CMD ["npm", "run", "start"]
CMD ["node", "lib/index.js"]