Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ecf7d0
commit 49e10b2
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM nginx | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl wget | ||
|
||
# Install openvidu-call | ||
RUN mkdir -p /var/www/openvidu-call | ||
RUN wget -L -O /var/www/openvidu-call/openvidu-call.tar.gz \ | ||
"https://github.com/OpenVidu/openvidu-call/releases/download/v2.12.0/openvidu-call-2.12.0.tar.gz" | ||
RUN tar zxf /var/www/openvidu-call/openvidu-call.tar.gz -C /var/www/openvidu-call | ||
RUN chown -R www-data:www-data /var/www/openvidu-call | ||
|
||
# Nginx conf | ||
COPY ./openvidu-call.conf /etc/nginx/conf.d/default.conf | ||
|
||
# Entrypoint | ||
COPY ./entrypoint.sh /usr/local/bin | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
# Cleaning the house | ||
RUN rm /var/www/openvidu-call/openvidu-call.tar.gz | ||
RUN apt-get clean && \ | ||
apt-get autoclean && \ | ||
rm -Rf /tmp/* && \ | ||
rm -Rf /var/lib/apt/lists/* | ||
|
||
CMD /usr/local/bin/entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
[[ -z "${OPENVIDU_URL}" ]] && export OPENVIDU_URL=$(curl -s ifconfig.co) | ||
[[ -z "${OPENVIDU_SECRET}" ]] && export OPENVIDU_SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | ||
|
||
echo "OPENVIDU URL: ${OPENVIDU_URL}" | ||
echo "OPENVIDU SECRET: ${OPENVIDU_SECRET}" | ||
|
||
# openvidu-call configuration | ||
cat>/var/www/openvidu-call/ov-settings.json<<EOF | ||
{ | ||
"openviduSettings": { | ||
"chat": true, | ||
"autopublish": false, | ||
"toolbarButtons": { | ||
"audio": true, | ||
"video": true, | ||
"screenShare": true, | ||
"fullscreen": true, | ||
"exit": true | ||
} | ||
}, | ||
"openviduCredentials": { | ||
"openvidu_url": "${OPENVIDU_URL}", | ||
"openvidu_secret": "${OPENVIDU_SECRET}" | ||
} | ||
} | ||
EOF | ||
|
||
chown www-data:www-data /var/www/openvidu-call/ov-settings.json | ||
service nginx restart | ||
|
||
tail -f /var/log/nginx/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
root /var/www/openvidu-call; | ||
} |