TelegramRSS/Dockerfile

32 lines
562 B
Docker
Raw Normal View History

2023-04-25 22:04:56 +00:00
FROM node:19 as builder
2020-01-07 22:03:26 +00:00
2023-04-25 22:04:56 +00:00
RUN mkdir -p /app
WORKDIR /app
2023-04-25 22:09:03 +00:00
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "tsconfig.json", "/app/"]
COPY [".yarn", "/app/.yarn"]
2023-04-25 22:04:56 +00:00
COPY ["src", "/app/src"]
2023-04-25 22:04:56 +00:00
RUN yarn install
RUN yarn build
FROM node:19
2020-01-07 22:03:26 +00:00
2023-04-25 22:04:56 +00:00
LABEL maintainer="Fabian Stamm <dev@fabianstamm.de>"
2020-01-07 22:03:26 +00:00
2023-04-25 22:04:56 +00:00
RUN mkdir -p /app
WORKDIR /app
2020-01-07 22:03:26 +00:00
ENV NODE_ENV=production
2023-04-26 17:25:13 +00:00
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "/app/"]
COPY [".yarn", "/app/.yarn"]
2020-01-07 22:03:26 +00:00
2023-04-12 20:27:05 +00:00
RUN yarn install
2020-01-07 22:03:26 +00:00
2023-04-26 17:15:51 +00:00
COPY --from=builder /app/lib/ /app/lib
2020-01-07 22:03:26 +00:00
2023-04-25 22:04:56 +00:00
VOLUME [ "/app/logs", "/app/persist"]
2020-01-07 22:03:26 +00:00
2023-04-25 22:04:56 +00:00
CMD ["node", "lib/index.js"]