-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
53 lines (28 loc) · 1.28 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:11-alpine AS build
RUN npm install -g lerna npm-local-development
ADD ./lerna.json /app/
ADD ./package.json /app/
ADD ./packages/core/package.json /app/packages/core/
ADD ./packages/core/package-lock.json /app/packages/core/
ADD ./packages/core-node/package.json /app/packages/core-node/
ADD ./packages/core-node/package-lock.json /apppackages/core-node/
ADD ./packages/deepkit/package.json /app/packages/deepkit/
ADD ./packages/deepkit/package-lock.json /app/packages/deepkit/
ADD ./packages/server/package.json /app/packages/server/
ADD ./packages/server/package-lock.json /app/packages/server/
RUN cd /app && npm run bootstrap
ADD ./packages /app/packages
RUN cd /app && npm-local-development --no-watcher
RUN cd /app/packages/deepkit && ./node_modules/.bin/ng build --prod
RUN cd /app/packages/server && npm run build
RUN rm -r /app/packages/core
RUN rm -r /app/packages/core-node
RUN rm -r /app/packages/cli
RUN cd /app/packages/deepkit && rm -r node_modules/@deepkit && npm prune --production
RUN cd /app/packages/server && rm -r node_modules/@deepkit && npm prune --production
FROM node:11-alpine
EXPOSE 8960
RUN apk --no-cache add tzdata
COPY --from=build /app /app
WORKDIR /app/packages/server
CMD node dist/main.js --server-mode --mongo-host mongo --redis-host redis