user/ci/Dockerfile

26 lines
455 B
Docker
Raw Normal View History

2023-01-09 14:08:45 +00:00
###################
2023-01-10 07:54:29 +00:00
# BUILD FOR CI TESTING
2023-01-09 14:08:45 +00:00
###################
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 . .
2023-01-10 10:35:18 +00:00
RUN npx prisma generate
2023-01-09 14:08:45 +00:00
# Creates a "dist" folder
RUN npm run build
2023-01-10 07:54:29 +00:00
# Start the server using the production build
2023-01-10 09:48:15 +00:00
CMD [ "node", "dist/main.js" ]