web: allow to configure shard name using env variable

pull/342/head
Prayag Singh 4 years ago committed by GitHub
parent a6853ef5f7
commit 78699fe65a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docker-compose.yml
  2. 4
      web/rootfs/defaults/meet.conf
  3. 8
      web/rootfs/defaults/settings-config.js

@ -34,6 +34,8 @@ services:
- CONFIG_EXTERNAL_CONNECT
- DEPLOYMENTINFO_ENVIRONMENT
- DEPLOYMENTINFO_ENVIRONMENT_TYPE
- DEPLOYMENTINFO_REGION
- DEPLOYMENTINFO_SHARD
- DEPLOYMENTINFO_USERREGION
- DIALIN_NUMBERS_URL
- DIALOUT_AUTH_URL

@ -18,6 +18,10 @@ error_page 404 /static/404.html;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
{{ if .Env.DEPLOYMENTINFO_SHARD }}
add_header X-Jitsi-Shard {{ .Env.DEPLOYMENTINFO_SHARD }};
{{ end }}
location = /config.js {
alias /config/config.js;
}

@ -284,10 +284,18 @@ if (!config.hasOwnProperty('deploymentInfo')) config.deploymentInfo = {};
config.deploymentInfo.environment = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT }}';
{{ end -}}
{{ if .Env.DEPLOYMENTINFO_SHARD -}}
config.deploymentInfo.shard = '{{ .Env.DEPLOYMENTINFO_SHARD }}';
{{ end -}}
{{ if .Env.DEPLOYMENTINFO_ENVIRONMENT_TYPE -}}
config.deploymentInfo.envType = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT_TYPE }}';
{{ end -}}
{{ if .Env.DEPLOYMENTINFO_REGION -}}
config.deploymentInfo.region = '{{ .Env.DEPLOYMENTINFO_REGION }}';
{{ end -}}
{{ if $DEPLOYMENTINFO_USERREGION -}}
config.deploymentInfo.userRegion = '{{ $DEPLOYMENTINFO_USERREGION }}';
{{ end -}}

Loading…
Cancel
Save