jvb.conf 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {{ $COLIBRI_REST_ENABLED := .Env.COLIBRI_REST_ENABLED | default "false" | toBool }}
  2. {{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }}
  3. {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool }}
  4. {{ $JVB_MUC_NICKNAME := .Env.JVB_MUC_NICKNAME | default .Env.HOSTNAME -}}
  5. {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
  6. {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool }}
  7. {{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
  8. {{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.JVB_WS_SERVER_ID_FALLBACK -}}
  9. {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
  10. videobridge {
  11. ice {
  12. udp {
  13. port = {{ .Env.JVB_PORT }}
  14. }
  15. }
  16. apis {
  17. xmpp-client {
  18. configs {
  19. shard {
  20. HOSTNAME = "{{ .Env.XMPP_SERVER }}"
  21. PORT = "{{ $XMPP_PORT }}"
  22. DOMAIN = "{{ .Env.XMPP_AUTH_DOMAIN }}"
  23. USERNAME = "{{ .Env.JVB_AUTH_USER }}"
  24. PASSWORD = "{{ .Env.JVB_AUTH_PASSWORD }}"
  25. MUC_JIDS = "{{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
  26. MUC_NICKNAME = "{{ $JVB_MUC_NICKNAME }}"
  27. DISABLE_CERTIFICATE_VERIFICATION = true
  28. }
  29. }
  30. }
  31. rest {
  32. enabled = {{ $COLIBRI_REST_ENABLED }}
  33. }
  34. }
  35. rest {
  36. shutdown {
  37. enabled = {{ $SHUTDOWN_REST_ENABLED }}
  38. }
  39. }
  40. stats {
  41. enabled = true
  42. }
  43. websockets {
  44. enabled = {{ $ENABLE_COLIBRI_WEBSOCKET }}
  45. domain = "{{ $WS_DOMAIN }}"
  46. tls = true
  47. server-id = "{{ $WS_SERVER_ID }}"
  48. }
  49. http-servers {
  50. private {
  51. host = 0.0.0.0
  52. }
  53. public {
  54. host = 0.0.0.0
  55. port = 9090
  56. }
  57. }
  58. {{ if $ENABLE_OCTO -}}
  59. octo {
  60. enabled = true
  61. bind-address = "{{ .Env.JVB_OCTO_BIND_ADDRESS | default "0.0.0.0" }}"
  62. public-address = "{{ .Env.JVB_OCTO_PUBLIC_ADDRESS }}"
  63. bind-port = "{{ .Env.JVB_OCTO_BIND_PORT | default "4096" }}"
  64. region = "{{ .Env.JVB_OCTO_REGION | default "europe" }}"
  65. }
  66. {{ end -}}
  67. }
  68. ice4j {
  69. harvest {
  70. mapping {
  71. stun {
  72. {{ if .Env.JVB_STUN_SERVERS -}}
  73. addresses = [ "{{ join "\",\"" (splitList "," .Env.JVB_STUN_SERVERS) }}" ]
  74. {{ else -}}
  75. enabled = false
  76. {{ end -}}
  77. }
  78. static-mappings = [
  79. {{ if .Env.DOCKER_HOST_ADDRESS -}}
  80. {
  81. local-address = "{{ .Env.LOCAL_ADDRESS }}"
  82. public-address = "{{ .Env.DOCKER_HOST_ADDRESS }}"
  83. }
  84. {{ end -}}
  85. ]
  86. }
  87. }
  88. }