forked from mathematicalthinking/vmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-dev
29 lines (23 loc) · 990 Bytes
/
Dockerfile-dev
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
FROM node:14.19.3@sha256:02b43f48cbecaef7402988542d6f1a5377d9c4eae8d77156a6e33b15a37283c4
RUN apt update -y && apt upgrade -y && apt install -y curl wget zip unzip bash iputils-ping net-tools dnsutils
#RUN npm install -g [email protected] [email protected]
ENV NODE_PATH=src \
PORT=1340 \
NODE_OPTIONS=--max_old_space_size=3072
WORKDIR /web
# install client dev dependencies for building app
COPY client/package*.json ./client/
RUN cd client && npm i
# install server dev dependencies
COPY server/package*.json ./server/
RUN cd server && npm i
# copy code to the client dir
COPY ./client /web/client/
# build VMT React client for production
# RUN cd ./server && npm run build-production
RUN cd ./client && node --max-old-space-size=3072 scripts/build.js production
# copy code to the server dir
COPY ./server /web/server/
EXPOSE 1340
CMD ["node", "/web/server/bin/www"]
#CMD ["tail", "-f", "/dev/null"] # uncomment this line to keep a crashing container up for troubleshooting