forked from TerriaJS/TerriaMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 674 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 674 Bytes
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
# develop container
FROM node:14 as develop
# build container
FROM node:14 as build
USER node
COPY --chown=node:node . /app
WORKDIR /app
RUN yarn install
RUN yarn gulp release
# deploy container
FROM node:14-slim as deploy
USER node
WORKDIR /app
COPY --from=build /app/wwwroot wwwroot
COPY --from=build /app/node_modules node_modules
COPY --from=build /app/devserverconfig.json serverconfig.json
COPY --from=build /app/index.js index.js
COPY --from=build /app/package.json package.json
COPY --from=build /app/version.js version.js
EXPOSE 3001
ENV NODE_ENV=production
CMD [ "node", "./node_modules/terriajs-server/lib/app.js", "--config-file", "serverconfig.json" ]