2023-06-24 20:09:09 +02:00
|
|
|
FROM node:alpine as files
|
2023-06-24 20:31:37 +02:00
|
|
|
ENV TZ="Europe/Berlin"
|
2023-06-14 22:43:37 +02:00
|
|
|
WORKDIR /app
|
|
|
|
COPY [ "package-lock.json", "package.json", "index.ts", "tsconfig.json", "./" ]
|
|
|
|
|
2023-06-24 20:09:09 +02:00
|
|
|
FROM files as proddependencies
|
|
|
|
ENV NODE_ENV=production
|
2023-06-14 22:43:37 +02:00
|
|
|
RUN npm ci --omit=dev
|
|
|
|
|
2023-06-24 20:09:09 +02:00
|
|
|
FROM proddependencies as compile
|
2023-11-18 16:28:40 +01:00
|
|
|
COPY server ./server
|
2023-06-14 22:43:37 +02:00
|
|
|
RUN npm run build
|
|
|
|
CMD ["npm","run","start"]
|
2023-06-24 20:09:09 +02:00
|
|
|
|
|
|
|
FROM files as dependencies
|
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
FROM dependencies as test
|
2023-11-18 16:28:40 +01:00
|
|
|
COPY server ./server
|
2023-06-24 20:09:09 +02:00
|
|
|
COPY jest.config.js .
|
|
|
|
COPY tests ./tests
|
|
|
|
RUN npm run test
|