generated from samuikaze/angular-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 779 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
FROM node:alpine AS builder
WORKDIR /usr/app
COPY ./package*.json ./
RUN apk update && \
apk add --no-cache \
util-linux \
openssl && \
echo "Install Angular cli ..." && \
npm install -g @angular/cli && \
echo "Install dependencies ..." && \
npm install
COPY . .
COPY src src
RUN chmod +x ./.infrastructures/generate-secret-key.sh && \
/bin/ash ./.infrastructures/generate-secret-key.sh && \
ng build -c production --base-href /forwork/lsgames/backstage/
FROM nginx:alpine
COPY --from=builder /usr/app/dist/build-bundles /usr/share/nginx/html
COPY ./.infrastructures/nginx-configuration.conf /etc/nginx/conf.d/default.conf
RUN find /usr/share/nginx/html -type f -exec chmod 644 {} \; \
&& find /usr/share/nginx/html -type d -exec chmod 755 {} \; \