forked from dasch-swiss/beol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (23 loc) · 827 Bytes
/
Dockerfile
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
### STAGE 1: Build ###
# We label our stage as 'builder'
FROM node:18 as builder
LABEL maintainer="sepideh.alassi@unibas.ch"
# Sets the path where the app is going to be installed
ENV NODE_ROOT /usr/app/
# Creates the directory and all the parents (if they don’t exist)
RUN mkdir -p $NODE_ROOT
# Sets the /usr/app as the active directory
WORKDIR $NODE_ROOT
# Copies all the content
COPY . .
# Install all the packages
RUN npm install -g @angular/cli
RUN npm install
## Build the angular app in production mode and store the artifacts in dist folder
## should be: $(npm bin)/ng build --prod --env=prod --build-optimizer
RUN npm run build-prod
### STAGE 2: Setup ###
FROM daschswiss/nginx-server:1.1.2
LABEL maintainer="sepideh.alassi@unibas.ch"
RUN rm -rf /public/*
COPY --from=builder /usr/app/dist/beol /public