forked from edumeet/edumeet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
67 lines (42 loc) · 1.17 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM node:lts-alpine AS mm-builder
# Args
ARG BASEDIR=/opt
ARG MM=multiparty-meeting
ARG NODE_ENV=production
ARG SERVER_DEBUG=''
ARG BRANCH=master
ARG REACT_APP_DEBUG=''
WORKDIR ${BASEDIR}
RUN apk add --no-cache git bash
#checkout code
RUN git clone --single-branch --branch ${BRANCH} https://github.com/trustmedis/${MM}.git
#install app dep
WORKDIR ${BASEDIR}/${MM}/app
RUN npm install
# set app in producion mode/minified/.
ENV NODE_ENV ${NODE_ENV}
# Workaround for the next yarn run build => rm -rf public dir even if it does not exists.
# TODO: Fix it smarter
RUN mkdir -p ${BASEDIR}/${MM}/server/public
ENV REACT_APP_DEBUG=${REACT_APP_DEBUG}
# package web app
RUN npm run build
#install server dep
WORKDIR ${BASEDIR}/${MM}/server
RUN apk add --no-cache git build-base python linux-headers
RUN npm install
FROM node:lts-alpine
# Args
ARG BASEDIR=/opt
ARG MM=multiparty-meeting
ARG NODE_ENV=production
ARG SERVER_DEBUG=''
WORKDIR ${BASEDIR}
COPY --from=mm-builder ${BASEDIR}/${MM}/server ${BASEDIR}/${MM}/server
# Web PORTS
EXPOSE 80 443
EXPOSE 40000-49999/udp
## run server
ENV DEBUG ${SERVER_DEBUG}
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]