Added insecure-js docker files
This commit is contained in:
parent
d771f5b808
commit
49e44db216
20
openvidu-insecure-js/docker/Dockerfile
Normal file
20
openvidu-insecure-js/docker/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM nginx:1.19.2-alpine
|
||||
|
||||
ARG OPENVIDU_TUTORIALS_VERSION
|
||||
|
||||
RUN apk update && \
|
||||
# apk add wget && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Install insecure-js
|
||||
COPY ./web /var/www/openvidu-insecure-js
|
||||
RUN chown -R nginx:nginx /var/www/openvidu-insecure-js
|
||||
|
||||
# Nginx conf
|
||||
COPY ./docker/openvidu-insecure-js.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Entrypoint
|
||||
COPY ./docker/entrypoint.sh /usr/local/bin
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
CMD /usr/local/bin/entrypoint.sh
|
||||
6
openvidu-insecure-js/docker/create_image.sh
Executable file
6
openvidu-insecure-js/docker/create_image.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
pushd ../
|
||||
|
||||
docker build -f docker/Dockerfile -t openvidu/openvidu-insecure-js-demo .
|
||||
docker tag openvidu/openvidu-insecure-js-demo:latest openvidu/openvidu-insecure-js-demo:2.15.0
|
||||
18
openvidu-insecure-js/docker/entrypoint.sh
Normal file
18
openvidu-insecure-js/docker/entrypoint.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ ! -z "${OPENVIDU_URL}" ] && echo "OPENVIDU_URL: ${OPENVIDU_URL}" || echo "OPENVIDU_URL: default"
|
||||
[ ! -z "${OPENVIDU_SECRET}" ] && echo "OPENVIDU_SECRET: ${OPENVIDU_SECRET}" || echo "OPENVIDU_SECRET: default"
|
||||
|
||||
if [ ! -z "${OPENVIDU_URL}" ]; then
|
||||
sed -i "s/^var OPENVIDU_SERVER_URL =.*$/var OPENVIDU_SERVER_URL = \"$(echo "${OPENVIDU_URL}" | sed 's#/#\\/#g')\";/" /var/www/openvidu-insecure-js/app.js
|
||||
fi
|
||||
|
||||
if [ ! -z "${OPENVIDU_SECRET}" ]; then
|
||||
sed -i "s/^var OPENVIDU_SERVER_SECRET =.*$/var OPENVIDU_SERVER_SECRET = \"${OPENVIDU_SECRET}\";/" /var/www/openvidu-insecure-js/app.js
|
||||
fi
|
||||
|
||||
# Run nginx
|
||||
nginx -g "daemon on;"
|
||||
|
||||
# Show logs
|
||||
tail -f /var/log/nginx/*.log
|
||||
6
openvidu-insecure-js/docker/openvidu-insecure-js.conf
Normal file
6
openvidu-insecure-js/docker/openvidu-insecure-js.conf
Normal file
@ -0,0 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /var/www/openvidu-insecure-js;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user