diff --git a/do b/do index 6f737bc..9c6eb09 100644 --- a/do +++ b/do @@ -1 +1,47 @@ -se ha borrado todo \ No newline at end of file +FROM registry.sindominio.net/debian as builder + +RUN apt-get update && apt-get install -y nginx libnginx-mod-rtmp + +COPY mirar-release-key.asc /key.asc + +COPY riot-release-key.asc /key.asc + +# config nginx with rtmp app points +COPY nginx.conf /etc/nginx/ + +RUN mkdir -P /var/www/mirar.sindominio.net/hls + +WORKDIR /tmp/ + +# get video.min.js and video-js.min.css +RUN wget https://github.com/videojs/video.js/releases/download/v7.10.2/video-js-7.10.2.zip +RUN unzip video-js-7.10.2.zip -d video-js-7.10.2 +RUN cp video-js-7.10.2/video-js.min.css video-js-7.10.2/video.min.js /var/www/mirar.sindominio.net/ + +WORKDIR /tmp/ + +#get jquery +RUN wget https://code.jquery.com/jquery-3.5.1.slim.min.js +RUN mv /tmp/jquery-3.5.1.slim.min.js /var/www/html/live.example.com/jquery-slim.min.js + +--- +# App +FROM registry.sindominio.net/debian + +RUN apt-get update && apt-get install -y nginx && apt-get clean + +COPY --from=builder /src/webapp /app + +# set up nginx configuration +RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types && \ + sed -i 's/80/8888/g' /etc/nginx/sites-enabled/default && \ + sed -i 's/_log \/var\/.*;/_log \/dev\/stdout;/g' /etc/nginx/nginx.conf && \ + touch /var/log/nginx/error.log && chmod 666 /var/log/nginx/error.log && \ + chmod 777 /var/lib/nginx && \ + chmod 777 /run + +RUN rm -rf /var/www/html \ + && ln -s /app /var/www/html + +ENTRYPOINT ["/usr/sbin/nginx"] +CMD ["-g", "daemon off;"]