-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
52 lines (50 loc) · 2.25 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
52
FROM node:10.15.3 as adminbuilder
ENV MONGOLAB_URI=mongodb://52.170.2.48:27017/warehouse-local
RUN mkdir -p /apps/warehouse
RUN mkdir -p /apps/warehouse/client
RUN chown -R node:node /apps/warehouse
COPY . /apps/warehouse
WORKDIR /apps/warehouse
RUN npm install
RUN npm run angular2-sdk
WORKDIR /apps/warehouse/admin
RUN npm install
RUN npm run admin
FROM node:8.16 as notification
RUN mkdir -p /apps/warehouse
COPY . /apps/warehouse
WORKDIR /apps/warehouse/notification-service
RUN npm install
FROM shoppinpal/node:6.10
ENV MONGOLAB_URI=mongodb://admin:[email protected]:27017/warehouse-local
RUN echo '\n\
deb http://archive.debian.org/debian/ jessie-backports main \n\
deb-src http://archive.debian.org/debian/ jessie-backports main \n\
deb http://archive.debian.org/debian/ jessie main contrib non-free \n\
deb-src http://archive.debian.org/debian/ jessie main contrib non-free \n'\ > /etc/apt/sources.list
RUN chown -R node:node /usr/local
RUN apt-get -y update && apt-get -y --force-yes dist-upgrade && apt-get install -y --force-yes python-pip python-dev && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
ENV DEBIAN_FRONTEND=noninteractive
ENV GOSU_VERSION 1.10
RUN set -x \
&& apt-get update && apt-get install -y --force-yes --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /apps/warehouse
RUN chown -R node:node /apps/warehouse
WORKDIR /apps/warehouse
COPY package.json /apps/warehouse/package.json
COPY npm-shrinkwrap.json /apps/warehouse/npm-shrinkwrap.json
RUN npm install --no-optional --production && npm install grunt-cli
#RUN npm install -g bower
#RUN mv /apps/warehouse/node_modules /apps/node_modules
COPY . /apps/warehouse
#RUN bower --allow-root install
RUN chown -R node:node /apps/warehouse
ENV SCHEME=http
# Disable the debug logs for warehouse
#ENV DEBUG=shoppinpal:*,boot:*,common:models:*,server:*
#HEALTHCHECK --interval=1m --timeout=3s --start-period=1m CMD curl -f http://localhost:3000/api/StoreModels || exit 1
ENTRYPOINT [ "./docker-entrypoint.sh" ]
EXPOSE 3000
COPY --from=adminbuilder /apps/warehouse/client/admin /apps/warehouse/client/admin
COPY --from=notification /apps/warehouse/notification-service/node_modules /apps/warehouse/notification-service/node_modules
CMD [ "node","server/server.js" ]