mirror of
https://gitlab.com/mobicoop/v3/service/auth.git
synced 2026-01-02 19:12:41 +00:00
add ci --check
This commit is contained in:
29
ci/Dockerfile
Normal file
29
ci/Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
###################
|
||||
# BUILD FOR CI TESTING
|
||||
###################
|
||||
|
||||
FROM node:18-alpine3.16
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
||||
COPY package*.json ./
|
||||
|
||||
# Install app dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
|
||||
# Generate prisma client
|
||||
RUN npx prisma generate
|
||||
|
||||
# Create a "dist" folder
|
||||
RUN npm run build
|
||||
|
||||
# Run unit tests
|
||||
RUN npm run test:unit:ci
|
||||
|
||||
# Start the server
|
||||
CMD [ "node", "dist/main.js" ]
|
||||
Reference in New Issue
Block a user