aboutsummaryrefslogtreecommitdiff
path: root/docker/jitsi/jitsi-front/entrypoint.sh
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-03-27 09:03:39 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-03-27 09:03:39 +0100
commitfd6e6aa1413602fc11bf79f7cf08120d996b8b3a (patch)
tree5e3b2e7f6ad788ef8a0f785056400442bb4d1cc7 /docker/jitsi/jitsi-front/entrypoint.sh
parent08101b82621457195c9a080237913d2c5a30208e (diff)
parenta95017cf1e1761fef1ec029105d1c25f954741d4 (diff)
downloadinfrastructure-fd6e6aa1413602fc11bf79f7cf08120d996b8b3a.tar.gz
infrastructure-fd6e6aa1413602fc11bf79f7cf08120d996b8b3a.zip
Merge branch 'feature/jitsi'
Diffstat (limited to 'docker/jitsi/jitsi-front/entrypoint.sh')
-rwxr-xr-xdocker/jitsi/jitsi-front/entrypoint.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/docker/jitsi/jitsi-front/entrypoint.sh b/docker/jitsi/jitsi-front/entrypoint.sh
new file mode 100755
index 0000000..1e18bd1
--- /dev/null
+++ b/docker/jitsi/jitsi-front/entrypoint.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+cat > /etc/nginx/sites-available/jitsi <<EOF
+server_names_hash_bucket_size 64;
+
+server {
+ listen 0.0.0.0:443 ssl http2 default_server;
+ listen [::]:443 ssl http2 default_server;
+ server_name _;
+ ssl_certificate ${JITSI_CERTS_FOLDER}/jitsi.deuxfleurs.fr.crt;
+ ssl_certificate_key ${JITSI_CERTS_FOLDER}/jitsi.deuxfleurs.fr.key;
+ root /srv/jitsi-meet;
+ index index.html;
+ location ~ ^/([a-zA-Z0-9=\?]+)$ {
+ rewrite ^/(.*)$ / break;
+ }
+ location / {
+ ssi on;
+ }
+ # BOSH, Bidirectional-streams Over Synchronous HTTP
+ # https://en.wikipedia.org/wiki/BOSH_(protocol)
+ location /http-bind {
+ proxy_pass http://${JITSI_PROSODY_BOSH_HOST}:${JITSI_PROSODY_BOSH_PORT}/http-bind;
+ proxy_set_header X-Forwarded-For \$remote_addr;
+ proxy_set_header Host \$http_host;
+ }
+ # external_api.js must be accessible from the root of the
+ # installation for the electron version of Jitsi Meet to work
+ # https://github.com/jitsi/jitsi-meet-electron
+ location /external_api.js {
+ alias /srv/jitsi-meet/libs/external_api.min.js;
+ }
+}
+EOF
+
+ln -sf /etc/nginx/sites-available/jitsi /etc/nginx/sites-enabled/jitsi
+
+exec "$@"