forked from Amsterdam/ggw-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 749 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
37
FROM node:12.20.0-stretch AS builder
LABEL maintainer="[email protected]"
EXPOSE 80
WORKDIR /app
COPY package.json \
package-lock.json \
.eslintrc.js \
.gitignore \
babel.config.js \
jest.config.js \
postcss.config.js \
vue.config.js \
/app/
# Changing git URL because network is blocking git protocol...
RUN git config --global url."https://".insteadOf git://
RUN git config --global url."https://github.com/".insteadOf [email protected]:
# Install NPM dependencies.
RUN npm --production=false --unsafe-perm ci && \
npm cache clean --force
COPY . /app
# Build
RUN echo "run build"
RUN npm run build
# Deploy
FROM nginx:stable-alpine
COPY --from=builder /app/dist/. /var/www/html/
COPY default.conf /etc/nginx/conf.d/