-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (46 loc) · 1.29 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
FROM node:10.15.3-alpine
WORKDIR /vendor
# Install nginx dependencies
RUN apk add pcre-dev openssl-dev zlib-dev
# Install nginx
RUN set -x \
&& apk add --no-cache --virtual .build-dependencies \
git \
autoconf \
g++ \
make \
&& git clone --branch release-1.15.12 https://github.com/nginx/nginx.git \
&& git clone https://github.com/slugalisk/nginx-rtmp-module.git \
&& cd nginx \
&& ./auto/configure \
--with-http_ssl_module \
--with-stream \
--add-module=../nginx-rtmp-module \
--conf-path=/vendor/nginx.conf \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd .. \
&& apk del .build-dependencies
ENV PATH="/usr/local/nginx/sbin:${PATH}"
WORKDIR /app
# Install app
COPY . .
RUN set -x \
&& apk add --no-cache --virtual .build-dependencies \
autoconf \
automake \
g++ \
gcc \
libtool \
make \
python \
&& npm install -g yarn \
&& yarn install \
&& PUBLIC_URL=/ yarn run build \
&& yarn install --production --ignore-scripts --prefer-offline --force \
&& apk del .build-dependencies
# Copy default nginx config
COPY vendor/run/nginx.conf /vendor/nginx.conf
EXPOSE 1935 8080
ENTRYPOINT [ "yarn", "run" ]
CMD [ "server" ]