-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
51 lines (38 loc) · 1.23 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
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
# NOTE: We use a single Dockerfile to build development and production environments
#
# manually build Docker image
# ➔ docker build -t sharepointoscar/zspharmaliteratureapp:test -f Dockerfile --build-arg NODE_ENV=development .
#
#
# manually run image using port on any ip address on local host.
# using the image ID as last parameter
#
# docker run --rm -it -p 1337:1337 17e7f6e16553
#
#
FROM node:8.5.0
LABEL Oscar Medina <[email protected]>
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Set required environment where app will run
ENV NODE_ENV=${NODE_ENV}
ENV PORT ${PORT}
ENV MONGODB_HOST=${MONGODB_HOST}
ENV MONGODB_PORT=${MONGODB_PORT}
ENV MONGODB_USERNAME=${MONGODB_USERNAME}
ENV MONGODB_PASSWORD=${MONGODB_PASSWORD}
ENV MONGODB_URI=${MONGO_URI}
ENV ENABLE_ELASTICSEARCH=${ENABLE_ELASTICSEARCH}
ENV DISABLE_SAILS_SEED=${DISABLE_SAILS_SEED}
ENV ELASTICSEARCH_URL=${ELASTICSEARCH_URL}
#RUN npm install -g grunt-cli
#RUN npm install -g bower
#RUN echo '{ "allow_root": true }' > /root/.bowerrc
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
#RUN bower install --allow-root
#RUN grunt build
EXPOSE 80
CMD [ "npm", "start" ]