/
Dockerfile
51 lines (43 loc) · 1.03 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# build stage
FROM node:lts-alpine as build-stage
LABEL maintainer="f.diblen@esciencecenter.nl"
ENV NPM_CONFIG_LOGLEVEL info
WORKDIR /app
#ENV DEBUG="*"
RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
RUN apk update && apk upgrade && \
apk --no-cache add curl && \
apk --no-cache add --update \
nodejs nodejs-npm \
nano \
git \
build-base \
libtool \
autoconf \
automake \
jq \
nasm \
libexecinfo-dev@edge \
gcc \
musl-dev \
make \
tiff \
jpeg \
zlib \
zlib-dev \
file \
pkgconf
COPY package*.json ./
RUN npm install --silent
COPY . .
COPY .env.sample .env
RUN npm run build
# EXPOSE 80 443 8080 9966
# CMD ["npm", "run", "start"]
# production stage - nginx
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
RUN mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.orig
COPY conf/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]