-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 840 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 840 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
FROM node:carbon
ARG MACHINE_NAME=adeq-webapp
ENV MACHINE_NAME=${MACHINE_NAME}}
# app directory
WORKDIR /usr/src/adeq-webapp
RUN mkdir -p /usr/src/adeq-webapp/logs
RUN mkdir -p /usr/src/adeq-webapp/downloads
# install app dependencies
COPY package.json ./
# install nano cmd editor as it's not bundled with node:carbon
RUN apt-get update
RUN apt-get install nano
# RUN npm rebuild bcrypt --build-from-source
RUN npm install
RUN npm install pm2 -g
# bundle app ADD source
COPY serve.js ./
COPY src/client/build ./src/client/build
EXPOSE 8001
# todo define run script for both server and backend in forever mode
# CMD ["./node_modules/.bin/pm2-docker", "run", "server"]
# CMD pm2-docker --public q0o7w0cvxs0nh79 --secret g2ohphn8dts4he0 server/loader.js --machine-name $MACHINE_NAME
CMD pm2-docker serve.js --machine-name $MACHINE_NAME