forked from gsalucci/streamplatform
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 671 Bytes
/
Dockerfile
File metadata and controls
27 lines (23 loc) · 671 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
FROM alpine
RUN apk update \
&& apk add --no-cache openssl ca-certificates nginx nginx-mod-rtmp ffmpeg nodejs nodejs-npm\
&& rm -rf /var/cache/apk/* \
&& mkdir -p /www /var/sock /var/rec /www/backend /www/frontend \
&& npm install -g @vue/cli
COPY frontend /www/frontend
COPY backend /www/backend
ADD nginx.conf /etc/nginx/nginx.conf
ADD startup.sh /
RUN chown nginx:nginx /www /var/sock /var/rec
RUN cd /var \
&& chown nginx:nginx rec
RUN cd /www/frontend \
&& npm install \
&& npm run build \
&& mv ./dist/* ../ \
&& rm -rf frontend
RUN cd /www/backend \
&& npm install
VOLUME /var/rec
EXPOSE 80 1935 8080
CMD sh startup.sh