forked from edumeet/edumeet-docker
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
44 lines (33 loc) · 975 Bytes
/
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
FROM node:10-slim
# Args
ARG REPO=befair
ARG EDUMEET=edumeet
ARG BRANCH=master
ARG BASEDIR=/opt
ARG NODE_ENV=production
ARG SERVER_DEBUG=''
ARG REACT_APP_DEBUG=''
ENV DEBUG ${SERVER_DEBUG}
ENV NODE_ENV ${NODE_ENV}
ENV REACT_APP_DEBUG=${REACT_APP_DEBUG}
# Install system dep
RUN apt update && apt install -y git bash build-essential python
# Checkout code
RUN git clone --single-branch --branch ${BRANCH} https://github.com/${REPO}/${EDUMEET}.git ${BASEDIR}/${EDUMEET}
# Install server dep
WORKDIR ${BASEDIR}/${EDUMEET}/server
RUN npm install
RUN npm install logstash-client
# Install client dep
WORKDIR ${BASEDIR}/${EDUMEET}/app
RUN npm install
# Workaround for the next npm run build => rm -rf public dir even if it does not exists.
# TODO: Fix it smarter
RUN mkdir -p ${BASEDIR}/${EDUMEET}/server/public
# Build client side app
RUN npm run build
# Run server
EXPOSE 80 443
EXPOSE 40000-49999/udp
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]