@drumee/setup-infra 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +3 -0
  3. package/configs/etc/cron.d/drumee +6 -0
  4. package/configs/etc/postfix/master.cf +137 -0
  5. package/congigure/init/acme +69 -0
  6. package/congigure/init/mail +16 -0
  7. package/congigure/init/named +27 -0
  8. package/congigure/menu/menu -tmp +144 -0
  9. package/congigure/menu/menu-install +147 -0
  10. package/congigure/menu/menu-reinstall +15 -0
  11. package/congigure/prepare +10 -0
  12. package/congigure/preset/jitsi +9 -0
  13. package/congigure/setup-infra +58 -0
  14. package/congigure/setup-schemas +57 -0
  15. package/congigure/start +29 -0
  16. package/congigure/utils/configure +56 -0
  17. package/congigure/utils/dependencies +90 -0
  18. package/congigure/utils/jitsi +122 -0
  19. package/congigure/utils/misc +77 -0
  20. package/congigure/utils/prompt.sh +35 -0
  21. package/congigure/utils/setup-versions +7 -0
  22. package/index.js +572 -0
  23. package/package.json +30 -0
  24. package/template.js +453 -0
  25. package/templates/env/application.json.tpl +0 -0
  26. package/templates/env/logrotate.tpl +7 -0
  27. package/templates/etc/bind/named.conf.local +13 -0
  28. package/templates/etc/bind/named.conf.log +105 -0
  29. package/templates/etc/bind/named.conf.options +33 -0
  30. package/templates/etc/dkimkeys/dkim.key +1 -0
  31. package/templates/etc/drumee/conf.d/conference.json.tpl +9 -0
  32. package/templates/etc/drumee/conf.d/drumee.json.tpl +7 -0
  33. package/templates/etc/drumee/conf.d/exchange.json.tpl +4 -0
  34. package/templates/etc/drumee/conf.d/myDrumee.json.tpl +16 -0
  35. package/templates/etc/drumee/credential/db.json.tpl +6 -0
  36. package/templates/etc/drumee/credential/email.json.tpl +12 -0
  37. package/templates/etc/drumee/credential/ovh/dns.json.tpl +6 -0
  38. package/templates/etc/drumee/credential/ovh/dns.sh.tpl +7 -0
  39. package/templates/etc/drumee/credential/redis.json.tpl +6 -0
  40. package/templates/etc/drumee/credential/sms.json.tpl +6 -0
  41. package/templates/etc/drumee/dnsapi.sh.tpl +28 -0
  42. package/templates/etc/drumee/drumee.sh.tpl +43 -0
  43. package/templates/etc/drumee/env.json +29 -0
  44. package/templates/etc/drumee/infrastructure/internals/accel.conf.tpl +47 -0
  45. package/templates/etc/drumee/infrastructure/mfs.conf.tpl +16 -0
  46. package/templates/etc/drumee/infrastructure/platform.json.tpl +16 -0
  47. package/templates/etc/drumee/infrastructure/routes/main.conf.tpl +143 -0
  48. package/templates/etc/drumee/infrastructure/servers/tt.conf +199 -0
  49. package/templates/etc/drumee/ssl/main.conf.tpl +10 -0
  50. package/templates/etc/jitsi/jicofo/config +2 -0
  51. package/templates/etc/jitsi/jicofo/defaults/jicofo.conf +225 -0
  52. package/templates/etc/jitsi/jicofo/defaults/logging.properties +15 -0
  53. package/templates/etc/jitsi/jicofo/jicofo.conf.tpl +46 -0
  54. package/templates/etc/jitsi/jicofo/logging.properties.tpl +12 -0
  55. package/templates/etc/jitsi/meet.conf.tpl +131 -0
  56. package/templates/etc/jitsi/ssl.conf.tpl +25 -0
  57. package/templates/etc/jitsi/videobridge/config +2 -0
  58. package/templates/etc/jitsi/videobridge/defaults/jvb.conf +129 -0
  59. package/templates/etc/jitsi/videobridge/defaults/logging.properties +12 -0
  60. package/templates/etc/jitsi/videobridge/jvb.conf +67 -0
  61. package/templates/etc/jitsi/videobridge/logging.properties.tpl +12 -0
  62. package/templates/etc/jitsi/web/config.js.tpl +208 -0
  63. package/templates/etc/jitsi/web/defaults/default +26 -0
  64. package/templates/etc/jitsi/web/defaults/ffdhe2048.txt +8 -0
  65. package/templates/etc/jitsi/web/defaults/interface_config.js +273 -0
  66. package/templates/etc/jitsi/web/defaults/meet.conf +193 -0
  67. package/templates/etc/jitsi/web/defaults/nginx.conf +73 -0
  68. package/templates/etc/jitsi/web/defaults/settings-config.js +480 -0
  69. package/templates/etc/jitsi/web/defaults/ssl.conf +28 -0
  70. package/templates/etc/jitsi/web/defaults/system-config.js +60 -0
  71. package/templates/etc/jitsi/web/interface_config.js +273 -0
  72. package/templates/etc/mail/dkim.key +1 -0
  73. package/templates/etc/mailname +1 -0
  74. package/templates/etc/mysql/mariadb.conf.d/50-server.cnf +120 -0
  75. package/templates/etc/nginx/modules-enabled/90-turn-relay.conf +27 -0
  76. package/templates/etc/nginx/modules-enabled/90-turn-relay.conf.tpl +27 -0
  77. package/templates/etc/nginx/nginx.conf +65 -0
  78. package/templates/etc/nginx/sites-enabled/drumee.conf.tpl +33 -0
  79. package/templates/etc/nginx/sites-enabled/jitsi.conf.tpl +28 -0
  80. package/templates/etc/nginx/sites-enabled/turnrelay.conf.tpl +9 -0
  81. package/templates/etc/opendkim/KeyTable +1 -0
  82. package/templates/etc/postfix/main.cf +76 -0
  83. package/templates/etc/postfix/mysql-virtual-alias-maps.cf +5 -0
  84. package/templates/etc/postfix/mysql-virtual-mailbox-domains.cf +5 -0
  85. package/templates/etc/postfix/mysql-virtual-mailbox-maps.cf +5 -0
  86. package/templates/etc/prosody/conf.d/vhost.cfg.lua.tpl +162 -0
  87. package/templates/etc/prosody/defaults/conf.d/jitsi-meet.cfg.lua +406 -0
  88. package/templates/etc/prosody/defaults/credentials.sh +10 -0
  89. package/templates/etc/prosody/defaults/prosody.cfg.lua +225 -0
  90. package/templates/etc/prosody/defaults/saslauthd.conf +30 -0
  91. package/templates/etc/prosody/prosody.cfg.lua.tpl +203 -0
  92. package/templates/etc/turnserver.conf.tpl +46 -0
  93. package/templates/index.js +102 -0
  94. package/templates/schema/utils/configs.init.sql.tpl +20 -0
  95. package/templates/schema/utils/configs.update.sql.tpl +19 -0
  96. package/templates/server/ecosystem.config.js.tpl +8 -0
  97. package/templates/var/lib/bind/domain.tpl +70 -0
@@ -0,0 +1,6 @@
1
+ {
2
+ "redisHost": "<%= redis_host %>",
3
+ "redisPort": <%= redis_port %>,
4
+ "redisAuth": "<%= redis_pass %>",
5
+ "liveUpdateChannel": "<%= redis_channel %>"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "host": "127.0.0.1",
3
+ "port": 4006,
4
+ "user": "drumee-app",
5
+ "password": ""
6
+ }
@@ -0,0 +1,28 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+ export ACME_CERTS_DIR=<%= certs_dir %>
8
+ export ACME_DIR=<%= acme_dir %>
9
+ export ACME_DNS=<%= acme_dns %>
10
+ export ACME_EMAIL_ACCOUNT=<%= acme_email_account %>
11
+ export DRUMEE_CACHE_DIR=<%= cache_dir %>
12
+ export DRUMEE_DATA_DIR=<%= data_dir %>
13
+ export DRUMEE_DOMAIN_NAME=<%= domain_name %>
14
+ export DRUMEE_LOG_DIR=<%= log_dir %>
15
+ export DRUMEE_MFS_DIR=<%= data_dir %>/mfs
16
+ export DRUMEE_RUNTIME_DIR=<%= runtime_dir %>
17
+ export DRUMEE_SCHEMAS_DIR=<%= runtime_dir %>/server/schemas
18
+ export DRUMEE_SERVER_HOME=<%= server_dir %>
19
+ export DRUMEE_SERVER_NODE=<%= runtime_dir %>/dist/main/node_modules
20
+ export DRUMEE_STATIC_DIR=<%= static_dir %>
21
+ export DRUMEE_SYSTEM_GROUP=<%= system_group %>
22
+ export DRUMEE_SYSTEM_USER=<%= system_user %>
23
+ export DRUMEE_TMP_DIR=<%= runtime_dir %>/tmp
24
+ export DRUMEE_UI_HOME=<%= runtime_dir %>/ui
25
+ export LE_WORKING_DIR=<%= acme_dir %>
26
+ export OWN_SSL_CERTS_DIR=<%= own_certs_dir %>
27
+ export OWN_SSL=<%= own_ssl %>
28
+ export PUBLIC_UI_ROOT=<%= public_ui_root %>
@@ -0,0 +1,43 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+ export ACME_CA_SERVER=<%= ca_server %>
8
+ export ACME_CERTS_DIR=<%= certs_dir %>
9
+ export ACME_DIR=<%= acme_dir %>
10
+ export ACME_EMAIL_ACCOUNT=<%= acme_email_account %>
11
+ export ACME_STORE=<%= certs_dir %>/<%= domain_name %>_ecc
12
+ export APP_ROUTING_MARK=<%= public_ui_root %>
13
+ export CREDENTIAL_DIR=/etc/drumee/credential
14
+ export NSUPDATE_KEY=<%= nsupdate_key %>
15
+ export NSUPDATE_SERVER=ns1.<%= domain_name %>
16
+ export NSUPDATE_ZONE=<%= domain_name %>
17
+ export DRUMEE_DB_DIR=<%= db_dir %>
18
+ export DRUMEE_CACHE_DIR=<%= cache_dir %>
19
+ export DRUMEE_DATA_DIR=<%= data_dir %>
20
+ export DRUMEE_DOMAIN_NAME=<%= domain_name %>
21
+ export DRUMEE_EXPORT_DIR=<%= export_dir %>
22
+ export DRUMEE_IMPORT_DIR=<%= import_dir %>
23
+ export DRUMEE_LOG_DIR=<%= log_dir %>
24
+ export DRUMEE_MFS_DIR=<%= data_dir %>/mfs
25
+ export DRUMEE_ROOT='/srv/drumee'
26
+ export DRUMEE_RUNTIME_DIR=<%= runtime_dir %>
27
+ export DRUMEE_SCHEMAS_DIR=<%= runtime_dir %>/server/schemas
28
+ export DRUMEE_SERVER_HOME=<%= server_dir %>
29
+ export DRUMEE_SERVER_NODE=<%= runtime_dir %>/dist/main/node_modules
30
+ export DRUMEE_STATIC_DIR=<%= static_dir %>
31
+ export DRUMEE_SYSTEM_GROUP=<%= system_group %>
32
+ export DRUMEE_SYSTEM_USER=<%= system_user %>
33
+ export DRUMEE_TMP_DIR=<%= runtime_dir %>/tmp
34
+ export DRUMEE_UI_HOME=<%= runtime_dir %>/ui
35
+ export DRUMEE_BACKUP_LOCATION=<%= BACKUP_LOCATION %>
36
+ export DRUMEE_DB_BACKUP=<%= db_backup %>
37
+ export JITSI_DOMAIN=<%= jitsi_domain %>
38
+ export OWN_CERTS_DIR=<%= own_certs_dir %>
39
+ export PUBLIC_UI_ROOT=<%= public_ui_root %>
40
+
41
+ if [ -d "$OWN_CERTS_DIR" ]; then
42
+ export ACME_DIR="$OWN_CERTS_DIR"
43
+ fi
@@ -0,0 +1,29 @@
1
+ {
2
+ "ACME_CA_SERVER":"<%= ca_server %>",
3
+ "ACME_CERTS_DIR":"<%= certs_dir %>",
4
+ "ACME_DIR":"<%= acme_dir %>",
5
+ "ACME_DNS":"<%= acme_dns %>",
6
+ "ACME_EMAIL_ACCOUNT":"<%= acme_email_account %>",
7
+ "ACME_STORE":"<%= certs_dir %>/<%= domain_name %>_ecc",
8
+ "APP_ROUTING_MARK":"<%= public_ui_root %>",
9
+ "CREDENTIAL_DIR": "/etc/drumee/credential",
10
+ "DOMAIN_DESC": "My Drumee Box",
11
+ "CACHE_DIR":"<%= cache_dir %>",
12
+ "DATA_DIR":"<%= data_dir %>",
13
+ "DOMAIN_NAME":"<%= domain_name %>",
14
+ "EXPORT_DIR":"<%= export_dir %>",
15
+ "IMPORT_DIR":"<%= import_dir %>",
16
+ "LOG_DIR":"<%= log_dir %>",
17
+ "MFS_DIR":"<%= data_dir %>/mfs",
18
+ "RUNTIME_DIR":"<%= runtime_dir %>",
19
+ "SCHEMAS_DIR":"/opt/drumee/schemas",
20
+ "SERVER_HOME":"<%= server_dir %>",
21
+ "SERVER_NODE":"<%= runtime_dir %>/dist/main/node_modules",
22
+ "STATIC_DIR":"<%= static_dir %>",
23
+ "SYSTEM_GROUP":"<%= system_group %>",
24
+ "SYSTEM_USER":"<%= system_user %>",
25
+ "TMP_DIR":"<%= runtime_dir %>/tmp",
26
+ "UI_HOME":"<%= runtime_dir %>/ui",
27
+ "JITSI_DOMAIN":"<%= jitsi_domain %>",
28
+ "PUBLIC_UI_ROOT":"/-"
29
+ }
@@ -0,0 +1,47 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+ location /mfs/ {
8
+ gzip off;
9
+ internal;
10
+ add_header Cache-Control max-age=31536000;
11
+ add_header Content-Encoding $upstream_http_content_encoding;
12
+ add_header Access-Control-Allow-Origin <%= domain %>;
13
+ alias <%= data_dir %>/mfs/;
14
+ }
15
+
16
+ location /accel/ {
17
+ gzip off;
18
+ internal;
19
+ add_header Cache-Control max-age=31536000;
20
+ add_header Content-Encoding $upstream_http_content_encoding;
21
+ add_header Access-Control-Allow-Origin *;
22
+ alias <%= static_dir %>/;
23
+ }
24
+
25
+ location /-/static/ {
26
+ gzip off;
27
+ add_header Cache-Control max-age=31536000;
28
+ add_header Content-Encoding $upstream_http_content_encoding;
29
+ add_header Access-Control-Allow-Origin *;
30
+ alias <%= static_dir %>/;
31
+ }
32
+
33
+ location /-/images/ {
34
+ gzip off;
35
+ add_header Cache-Control max-age=31536000;
36
+ add_header Content-Encoding $upstream_http_content_encoding;
37
+ add_header Access-Control-Allow-Origin *;
38
+ alias <%= static_dir %>/images/;
39
+ }
40
+
41
+ location /-/fonts/ {
42
+ gzip off;
43
+ add_header Cache-Control max-age=31536000;
44
+ add_header Content-Encoding $upstream_http_content_encoding;
45
+ add_header Access-Control-Allow-Origin *;
46
+ alias <%= static_dir %>/fonts/;
47
+ }
@@ -0,0 +1,16 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+ location / {
8
+ index /-/;
9
+
10
+ location ~ (.+)\.(.+)$ {
11
+ add_header Cache-Control max-age=31536000;
12
+ fastcgi_hide_header Set-Cookie;
13
+ add_header Access-Control-Allow-Origin <%= domain %>;
14
+ rewrite /(.+)$ <%= public_ui_root %>/svc/media.raw?p=$1&d=inline;
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+ location / {
8
+ location ~ (.+)\.(.+)$ {
9
+ #expires 7d;
10
+ add_header Cache-Control max-age=31536000;
11
+ #add_header Vary "Accept-Encoding";
12
+ fastcgi_hide_header Set-Cookie;
13
+ add_header Access-Control-Allow-Origin <%= domain %>;
14
+ rewrite /(.+)$ <%= public_ui_root %>/service/?service=media.raw&p=$1&d=inline;
15
+ }
16
+ }
@@ -0,0 +1,143 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+
8
+ location <%= location %>app/ {
9
+ alias /srv/drumee/runtime/ui/dist/<%= endpoint %>/app/;
10
+ add_header Cache-Control max-age=31536000;
11
+ add_header Access-Control-Allow-Origin <%= domain %>;
12
+ fastcgi_hide_header Set-Cookie;
13
+ break;
14
+ }
15
+
16
+ # Frontend application assets
17
+ location <%= location %>api/ {
18
+ alias /srv/drumee/runtime/ui/dist/<%= endpoint %>/api/;
19
+ add_header Cache-Control max-age=31536000;
20
+ add_header Access-Control-Allow-Origin <%= domain %>;
21
+ fastcgi_hide_header Set-Cookie;
22
+ break;
23
+ }
24
+
25
+ # Frontend application assets
26
+ location <%= location %>plugins/ {
27
+ alias /srv/drumee/runtime/ui/dist/<%= endpoint %>/plugins/;
28
+ add_header Cache-Control max-age=31536000;
29
+ add_header Access-Control-Allow-Origin <%= domain %>;
30
+ fastcgi_hide_header Set-Cookie;
31
+ break;
32
+ }
33
+
34
+
35
+ # Frontend application templates
36
+ location <%= location %>bb-templates/ {
37
+ alias /srv/drumee/runtime/ui/dist/<%= endpoint %>/bb-templates/;
38
+ add_header Cache-Control max-age=31536000;
39
+ add_header Access-Control-Allow-Origin *;
40
+ fastcgi_hide_header Set-Cookie;
41
+ break;
42
+ }
43
+
44
+
45
+ location <%= location %> {
46
+ fastcgi_hide_header Set-Cookie;
47
+ add_header Cache-Control max-age=31536000;
48
+
49
+ location ~ /(svc|vdo|service)/ {
50
+ proxy_pass http://127.0.0.1:<%= restPort %>;
51
+ proxy_http_version 1.1;
52
+ proxy_set_header Upgrade $http_upgrade;
53
+ proxy_set_header Connection 'upgrade';
54
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
55
+ proxy_set_header X-Real-IP $remote_addr;
56
+ proxy_set_header X-Connecting-IP $remote_addr;
57
+ proxy_set_header Host $host;
58
+ add_header Vary "Accept-Encoding";
59
+ fastcgi_hide_header Set-Cookie;
60
+ break;
61
+ }
62
+
63
+ location ~ /(ws|websocket)/ {
64
+ proxy_pass http://127.0.0.1:<%= pushPort %>;
65
+ proxy_http_version 1.1;
66
+ proxy_set_header Upgrade $http_upgrade;
67
+ proxy_set_header Connection 'upgrade';
68
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
69
+ proxy_set_header X-Real-IP $remote_addr;
70
+ proxy_set_header X-Connecting-IP $remote_addr;
71
+ proxy_set_header Host $host;
72
+ add_header Vary "Accept-Encoding";
73
+ fastcgi_hide_header Set-Cookie;
74
+ break;
75
+ }
76
+
77
+ #------------ parts/apis ------------
78
+ location ~ /file/(.+)/(.*)$ {
79
+ fastcgi_hide_header Set-Cookie;
80
+ rewrite /file/(.+)/(.+)/(.+)\.(.*)$ /-/svc/media.$1?nid=$2&hub_id=$3 last;
81
+ rewrite /file/(.+)/(.+)/(.+)/(.*)$ /-/svc/media.$1?nid=$2&hub_id=$3 last;
82
+ rewrite /file/(.+)/(.+)/(.+)$ /-/svc/media.$1?nid=$2&hub_id=$3 last;
83
+ rewrite /file/(.+)/(.+)\.(.+)$ /-/svc/media.$1?nid=$2 last;
84
+ rewrite /file/(.+)/(.+)$ /-/svc/media.$1?nid=$2 last;
85
+ break;
86
+ }
87
+
88
+
89
+ location ~ /doc/(.+)/(.*)$ {
90
+ add_header Cache-Control max-age=31536000;
91
+ fastcgi_hide_header Set-Cookie;
92
+ rewrite /doc/(.+)/(.+)/(.+)\.(.*)$ /-/svc/media.read?page=$1&nid=$2&hub_id=$3 last;
93
+ rewrite /doc/(.+)/(.+)/(.+)$ /-/svc/media.read?page=$1&nid=$2&hub_id=$3 last;
94
+ rewrite /doc/(.+)/(.+)\.(.+)$ /-/svc/media.read?page=$1&nid=$2 last;
95
+ rewrite /doc/(.+)/(.+)$ /-/svc/media.read?page=$1&nid=$2 last;
96
+ break;
97
+ }
98
+
99
+ location ~ /letc/(.+)$ {
100
+ add_header Cache-Control max-age=31536000;
101
+ fastcgi_hide_header Set-Cookie;
102
+ rewrite /letc/(.+)\@(.+)$ /-/svc/block.content?hashtag=$1&owner=$2 last;
103
+ rewrite /letc/(.+)/(.+)$ /-/svc/block.content?hashtag=$1&owner=$2 last;
104
+ rewrite /letc/(.+)$ /-/svc/block.content?hashtag=$1 last;
105
+ break;
106
+ }
107
+
108
+
109
+ location ~ /avatar/(.+)$ {
110
+ add_header Pragma public;
111
+ add_header Cache-Control max-age=31536000;
112
+ fastcgi_hide_header Set-Cookie;
113
+ add_header Access-Control-Allow-Origin <%= domain %>;
114
+ rewrite /avatar/(.+)$ /-/svc/yp.avatar?id=$1 last;
115
+ break;
116
+ }
117
+
118
+ location ~ (.+)\.(.+)$ {
119
+ fastcgi_hide_header Set-Cookie;
120
+ add_header Cache-Control max-age=31536000;
121
+ add_header Access-Control-Allow-Origin <%= domain %>;
122
+ rewrite /somanos/(.+)$ /-/svc/media.raw&p=$1&d=inline;
123
+ break;
124
+ }
125
+
126
+
127
+ #------------ parts/index ------------
128
+ location ~ (/|)$ {
129
+ proxy_pass http://127.0.0.1:<%= pushPort %>;
130
+ proxy_http_version 1.1;
131
+ proxy_set_header Upgrade $http_upgrade;
132
+ proxy_set_header Connection 'upgrade';
133
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
134
+ proxy_set_header X-Real-IP $remote_addr;
135
+ proxy_set_header X-Connecting-IP $remote_addr;
136
+ proxy_set_header Host $host;
137
+ proxy_set_header Referer $http_referer;
138
+ add_header Access-Control-Allow-Credentials true;
139
+ add_header Vary "Accept-Encoding";
140
+ fastcgi_hide_header Set-Cookie;
141
+ }
142
+
143
+ }
@@ -0,0 +1,199 @@
1
+ server_names_hash_bucket_size 64;
2
+
3
+ types {
4
+ # nginx's default mime.types doesn't include a mapping for wasm or wav.
5
+ application/wasm wasm;
6
+ audio/wav wav;
7
+ }
8
+ upstream prosody {
9
+ zone upstreams 64K;
10
+ server 127.0.0.1:5280;
11
+ keepalive 2;
12
+ }
13
+ upstream jvb1 {
14
+ zone upstreams 64K;
15
+ server 127.0.0.1:9090;
16
+ keepalive 2;
17
+ }
18
+ map $arg_vnode $prosody_node {
19
+ default prosody;
20
+ v1 v1;
21
+ v2 v2;
22
+ v3 v3;
23
+ v4 v4;
24
+ v5 v5;
25
+ v6 v6;
26
+ v7 v7;
27
+ v8 v8;
28
+ }
29
+ server {
30
+ listen 80;
31
+ listen [::]:80;
32
+ server_name placeholder.placeholder.com;
33
+
34
+ location ^~ /.well-known/acme-challenge/ {
35
+ default_type "text/plain";
36
+ root /usr/share/jitsi-meet;
37
+ }
38
+ location = /.well-known/acme-challenge/ {
39
+ return 404;
40
+ }
41
+ location / {
42
+ return 301 https://$host$request_uri;
43
+ }
44
+ }
45
+ server {
46
+ listen 443 ssl;
47
+ listen [::]:443 ssl;
48
+ server_name placeholder.placeholder.com;
49
+
50
+ # Mozilla Guideline v5.4, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration
51
+ ssl_protocols TLSv1.2 TLSv1.3;
52
+ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
53
+ ssl_prefer_server_ciphers off;
54
+
55
+ ssl_session_timeout 1d;
56
+ ssl_session_cache shared:SSL:10m; # about 40000 sessions
57
+ ssl_session_tickets off;
58
+
59
+ add_header Strict-Transport-Security "max-age=63072000" always;
60
+ set $prefix "";
61
+
62
+ ssl_certificate /usr/share/acme/certs/;
63
+ ssl_certificate_key /usr/share/acme/certs/;
64
+
65
+ root /usr/share/jitsi-meet;
66
+
67
+ # ssi on with javascript for multidomain variables in config.js
68
+ ssi on;
69
+ ssi_types application/x-javascript application/javascript;
70
+
71
+ index index.html index.htm;
72
+ error_page 404 /static/404.html;
73
+
74
+ gzip on;
75
+ gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
76
+ gzip_vary on;
77
+ gzip_proxied no-cache no-store private expired auth;
78
+ gzip_min_length 512;
79
+
80
+ location = /config.js {
81
+ alias /etc/jitsi/meet/placeholder.placeholder.com-config.js;
82
+ }
83
+
84
+ location = /external_api.js {
85
+ alias /usr/share/jitsi-meet/libs/external_api.min.js;
86
+ }
87
+
88
+ location = /_api/room-info {
89
+ proxy_pass http://prosody/room-info?prefix=$prefix&$args;
90
+ proxy_http_version 1.1;
91
+ proxy_set_header X-Forwarded-For $remote_addr;
92
+ proxy_set_header Host $http_host;
93
+ }
94
+
95
+ # ensure all static content can always be found first
96
+ location ~ ^/(libs|css|static|images|fonts|lang|sounds|.well-known)/(.*)$
97
+ {
98
+ add_header 'Access-Control-Allow-Origin' '*';
99
+ alias /usr/share/jitsi-meet/$1/$2;
100
+
101
+ # cache all versioned files
102
+ if ($arg_v) {
103
+ expires 1y;
104
+ }
105
+ }
106
+
107
+ # BOSH
108
+ location = /http-bind {
109
+ proxy_pass http://$prosody_node/http-bind?prefix=$prefix&$args;
110
+ proxy_http_version 1.1;
111
+ proxy_set_header X-Forwarded-For $remote_addr;
112
+ proxy_set_header Host $http_host;
113
+ proxy_set_header Connection "";
114
+ }
115
+
116
+ # xmpp websockets
117
+ location = /xmpp-websocket {
118
+ proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
119
+ proxy_http_version 1.1;
120
+ proxy_set_header Upgrade $http_upgrade;
121
+ proxy_set_header Connection "upgrade";
122
+ proxy_set_header Host $http_host;
123
+ tcp_nodelay on;
124
+ }
125
+
126
+ # colibri (JVB) websockets for jvb1
127
+ location ~ ^/colibri-ws/default-id/(.*) {
128
+ proxy_pass http://jvb1/colibri-ws/default-id/$1$is_args$args;
129
+ proxy_http_version 1.1;
130
+ proxy_set_header Upgrade $http_upgrade;
131
+ proxy_set_header Connection "upgrade";
132
+ tcp_nodelay on;
133
+ }
134
+
135
+ # load test minimal client, uncomment when used
136
+ #location ~ ^/_load-test/([^/?&:'"]+)$ {
137
+ # rewrite ^/_load-test/(.*)$ /load-test/index.html break;
138
+ #}
139
+ #location ~ ^/_load-test/libs/(.*)$ {
140
+ # add_header 'Access-Control-Allow-Origin' '*';
141
+ # alias /usr/share/jitsi-meet/load-test/libs/$1;
142
+ #}
143
+
144
+ location ~ ^/([^/?&:'"]+)$ {
145
+ try_files $uri @root_path;
146
+ }
147
+
148
+ location @root_path {
149
+ rewrite ^/(.*)$ / break;
150
+ }
151
+
152
+ location ~ ^/([^/?&:'"]+)/config.js$
153
+ {
154
+ set $subdomain "$1.";
155
+ set $subdir "$1/";
156
+
157
+ alias /etc/jitsi/meet/placeholder.placeholder.com-config.js;
158
+ }
159
+
160
+ # Matches /(TENANT)/pwa-worker.js or /(TENANT)/manifest.json to rewrite to / and look for file
161
+ location ~ ^/([^/?&:'"]+)/(pwa-worker.js|manifest.json)$ {
162
+ set $subdomain "$1.";
163
+ set $subdir "$1/";
164
+ rewrite ^/([^/?&:'"]+)/(pwa-worker.js|manifest.json)$ /$2;
165
+ }
166
+
167
+ # BOSH for subdomains
168
+ location ~ ^/([^/?&:'"]+)/http-bind {
169
+ set $subdomain "$1.";
170
+ set $subdir "$1/";
171
+ set $prefix "$1";
172
+
173
+ rewrite ^/(.*)$ /http-bind;
174
+ }
175
+
176
+ # websockets for subdomains
177
+ location ~ ^/([^/?&:'"]+)/xmpp-websocket {
178
+ set $subdomain "$1.";
179
+ set $subdir "$1/";
180
+ set $prefix "$1";
181
+
182
+ rewrite ^/(.*)$ /xmpp-websocket;
183
+ }
184
+
185
+ location ~ ^/([^/?&:'"]+)/_api/room-info {
186
+ set $subdomain "$1.";
187
+ set $subdir "$1/";
188
+ set $prefix "$1";
189
+
190
+ rewrite ^/(.*)$ /_api/room-info;
191
+ }
192
+
193
+ # Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
194
+ location ~ ^/([^/?&:'"]+)/(.*)$ {
195
+ set $subdomain "$1.";
196
+ set $subdir "$1/";
197
+ rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
198
+ }
199
+ }
@@ -0,0 +1,10 @@
1
+ # -------------------------------------------------------------
2
+ # ! DO NOT EDIT !
3
+ # Config file automatically generated by <infra-setup>
4
+ # Date : <%= date %>
5
+ # -------------------------------------------------------------
6
+
7
+ ssl_certificate_key <%= certs_dir %>/<%= domain %>_ecc/<%= domain %>.key;
8
+ ssl_certificate <%= certs_dir %>/<%= domain %>_ecc/fullchain.cer;
9
+ ssl_trusted_certificate <%= certs_dir %>/<%= domain %>_ecc/ca.cer;
10
+
@@ -0,0 +1,2 @@
1
+ # adds java system props that are passed to jicofo (default are for home and logging config file)
2
+ JAVA_SYS_PROPS="-Dconfig.file=/etc/jitsi/jicofo/jicofo.conf -Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/jicofo/logging.properties"