forked from ali1k/ld-r
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 957 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:10.11
MAINTAINER Ali Khalili "[email protected]"
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git
RUN mkdir /ld-r
WORKDIR /ld-r
RUN npm install webpack -g
ADD package.json /ld-r/
RUN npm install
ADD . /ld-r
#handle initial configs
RUN if [ ! -e "/ld-r/configs/general.js" ]; then cp /ld-r/configs/general.sample.js /ld-r/configs/general.js ; fi
RUN if [ ! -e "/ld-r/configs/server.js" ]; then cp /ld-r/configs/server.sample.js /ld-r/configs/server.js ; fi
RUN if [ ! -e "/ld-r/configs/reactor.js" ]; then cp /ld-r/configs/reactor.sample.js /ld-r/configs/reactor.js ; fi
RUN if [ ! -e "/ld-r/configs/facets.js" ]; then cp /ld-r/configs/facets.sample.js /ld-r/configs/facets.js ; fi
RUN if [ ! -e "/ld-r/plugins/email/config.js" ]; then cp /ld-r/plugins/email/config.sample.js /ld-r/plugins/email/config.js ; fi
#specify the port used by ld-r app
EXPOSE 4000
ENTRYPOINT ["npm", "run", "build"]