aboutsummaryrefslogtreecommitdiff
path: root/app/jitsi/build/jitsi-meet/entrypoint.sh
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-01-16 17:07:01 +0100
committerAlex Auvolat <alex@adnab.me>2021-01-16 17:07:01 +0100
commitc74dc92febd1841c8ea5ff31caab0f941d57527d (patch)
treed05a203d95cac988952799667ec43c327a5d9038 /app/jitsi/build/jitsi-meet/entrypoint.sh
parent0c4ee40e01c95d7bf73236cbead5cc261f67eb9d (diff)
downloadinfrastructure-c74dc92febd1841c8ea5ff31caab0f941d57527d.tar.gz
infrastructure-c74dc92febd1841c8ea5ff31caab0f941d57527d.zip
Proposal: reorganize app/ folder by modules
Diffstat (limited to 'app/jitsi/build/jitsi-meet/entrypoint.sh')
-rwxr-xr-xapp/jitsi/build/jitsi-meet/entrypoint.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/app/jitsi/build/jitsi-meet/entrypoint.sh b/app/jitsi/build/jitsi-meet/entrypoint.sh
new file mode 100755
index 0000000..1cd96dc
--- /dev/null
+++ b/app/jitsi/build/jitsi-meet/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:${NGINX_PORT} ssl http2 default_server;
+ listen [::]:${NGINX_PORT} 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 "$@"