forked from 52North/helgoland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (26 loc) · 795 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
FROM node:latest AS BUILD
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# copy package.json and install dependencies
COPY package.json package-lock.json /usr/src/app/
COPY scripts /usr/src/app/scripts
RUN npm install
# copy the app and build it
COPY . /usr/src/app
RUN npm run build --prod
FROM nginx:alpine
ENV PORT=80
ENV BASE_HREF=/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY ./52-*.sh /docker-entrypoint.d/
RUN chmod 0775 /docker-entrypoint.d/52-*.sh
COPY --from=BUILD /usr/src/app/dist/timeseries /usr/share/nginx/html
#
# the container can be started like this:
#
# docker run --publish 80:80 --env PORT=80 --rm 52north/helgoland
#
# this make helgoland available via http://localhost:80/ and
# removes the container after stopping it
#
CMD ["nginx", "-g", "daemon off;"]