Added test environment

This commit is contained in:
Michel ten Voorde
2024-11-05 15:37:49 +01:00
parent 95f955468f
commit a3244fc019
2 changed files with 58 additions and 42 deletions

16
Dockerfile-test Normal file
View File

@@ -0,0 +1,16 @@
FROM node:20.13.1-alpine3.19 as build
WORKDIR /app/src
COPY package*.json ./
RUN apk update
RUN apk add yarn
RUN yarn install --frozen-lockfile --no-progress
COPY . ./
RUN yarn build --configuration test
FROM node:20.13.1-alpine3.19
RUN addgroup -S k8s-group && adduser -S k8s-user -G k8s-group
USER root
WORKDIR /usr/app
COPY --from=build /app/src/dist/swiss-client/ ./
CMD node server/server.mjs
EXPOSE 4000