-
Notifications
You must be signed in to change notification settings - Fork 83
/
Dockerfile
54 lines (45 loc) · 1.25 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
FROM node:14.5.0-buster-slim as base
LABEL maintainer="Goran Jovanov <[email protected]>"
LABEL description="Roomler - Video Conferencing & Team Collaboration Tool"
ARG NODE_ENV=production
ARG HOST=0.0.0.0
ARG PORT=3000
ARG WS_SCALEOUT_ENABLED=true
ARG GOOGLE_ANALYTICS_ID=
# Environment variables
ENV NODE_ENV=${NODE_ENV}
ENV HOST=${HOST}
ENV PORT=${PORT}
ENV WS_SCALEOUT_ENABLED=${WS_SCALEOUT_ENABLED}
ENV GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}
ARG DEBIAN_FRONTEND=noninteractive
FROM base as build
# Install packages & git clone source code and build the application
RUN rm -rf /var/lib/apt/lists/* \
&& apt-get -y update \
&& apt-get install -yq apt-utils \
&& apt-get install -yq \
build-essential \
python \
git \
&& cd / \
&& git clone --depth=1 https://github.com/gjovanov/roomler.git \
&& cd /roomler \
&& npx lerna bootstrap --scope roomler.ui -- --production --no-optional \
&& yarn run build \
# Cleanup
&& cd / \
&& rm -Rf /tmp/* \
&& apt-get purge -y \
build-essential \
python \
git
FROM base as release
COPY --from=build /roomler /roomler
RUN yarn global add pm2
ADD VERSION .
VOLUME /roomler/packages/ui/static/uploads
WORKDIR /roomler
EXPOSE ${PORT}
# Define the Run command
CMD ["yarn", "run", "start"]