forked from istex/istex-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 877 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
FROM nginx:1.11.4
# to help docker debugging
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && apt-get -y install vim curl git-core
# nodejs installation used for build tools
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y build-essential nodejs
# install tools for bundle.js
WORKDIR /usr/share/nginx/html/
COPY ./package.json /usr/share/nginx/html/
RUN npm install
WORKDIR /usr/share/nginx/html/
# nginx config
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
# ezmasterization of istex-dl
# see https://github.com/Inist-CNRS/ezmaster
RUN echo '{ \
"httpPort": 80, \
"configPath": "/usr/share/nginx/html/www/config.json" \
}' > /etc/ezmaster.json
# build www/dist/bundle.js and www/dist/bundle.css for production
COPY ./src /usr/share/nginx/html/src/
COPY ./public /usr/share/nginx/html/public/
RUN npm run build