-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 722 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 722 Bytes
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
#------------------------------------------------------------------
FROM node:16.14.0 as builder
# Create and change to the 'project' directory.
WORKDIR /project
# Install project dependencies.
COPY package.json package-lock.json ./
RUN npm ci
# Copy the source code.
COPY . .
# Build browser bundles.
RUN npm run build
#-------------------------------------------------------------------
FROM nginx:1.21.6-alpine
# Copy the files to the production image from the builder stage.
COPY --from=builder /project/dist /project/dist
# NGINX configuration to serve the SPA.
COPY --from=builder /project/nginx/default.conf /etc/nginx/conf.d/default.conf
#-------------------------------------------------------------------