-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.ticket
37 lines (33 loc) · 1.03 KB
/
Dockerfile.ticket
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM node:16-alpine AS builder
# set working directory
WORKDIR /app
# install app dependencies
#copies package.json and package-lock.json to Docker environment
# COPY package-lock.json ./
COPY package.json ./
COPY yarn.lock ./
# Installs all node packages
# RUN npm ci
RUN yarn set version 3.3.0
# Copies everything over to Docker environment
COPY . ./
RUN rm -rf apps/admin
RUN yarn install
# RUN npm run build
RUN yarn ticket:build
RUN rm -rf apps/ticket/.next/cache
#Stage 2
#######################################
#pull the official nginx:1.19.0 base image
# FROM nginx:1.19.0
#copies React to the container directory
# Set working directory to nginx resources directory
# WORKDIR /usr/share/nginx/html
# COPY ./nginx/ticket.conf /etc/nginx/conf.d/default.conf
# Remove default nginx static resources
# RUN rm -rf ./usr/share/nginx/html/*
# Copies static resources from builder stage
# COPY --from=builder /app/build /usr/share/nginx/html/
# Containers run nginx with global directives and daemon off
EXPOSE 3000
CMD ["yarn", "ticket:start"]