Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

63 linhas
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. server {
  3. listen 8008;
  4. server_name {{ matrix_homeserver_proxy_hostname }};
  5. server_tokens off;
  6. root /dev/null;
  7. gzip on;
  8. gzip_types text/plain application/json;
  9. {% for configuration_block in matrix_homeserver_proxy_client_api_additional_server_configuration_blocks %}
  10. {{- configuration_block }}
  11. {% endfor %}
  12. {# Everything else just goes to the API server ##}
  13. location / {
  14. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  15. resolver {{ matrix_homeserver_proxy_http_level_resolver }} valid=5s;
  16. set $backend "{{ matrix_homeserver_proxy_client_api_addr }}";
  17. proxy_pass http://$backend;
  18. proxy_set_header Host $host;
  19. client_body_buffer_size 25M;
  20. client_max_body_size {{ matrix_homeserver_proxy_client_api_client_max_body_size_mb }}M;
  21. proxy_max_temp_file_size 0;
  22. }
  23. }
  24. {% if matrix_homeserver_proxy_federation_api_enabled %}
  25. server {
  26. listen 8048;
  27. server_name {{ matrix_homeserver_proxy_hostname }};
  28. server_tokens off;
  29. root /dev/null;
  30. gzip on;
  31. gzip_types text/plain application/json;
  32. {% for configuration_block in matrix_homeserver_proxy_federation_api_additional_server_configuration_blocks %}
  33. {{- configuration_block }}
  34. {% endfor %}
  35. {# Everything else just goes to the API server ##}
  36. location / {
  37. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  38. resolver {{ matrix_homeserver_proxy_http_level_resolver }} valid=5s;
  39. set $backend "{{ matrix_homeserver_proxy_federation_api_addr }}";
  40. proxy_pass http://$backend;
  41. proxy_set_header Host $host;
  42. client_body_buffer_size 25M;
  43. client_max_body_size {{ matrix_homeserver_proxy_federation_api_client_max_body_size_mb }}M;
  44. proxy_max_temp_file_size 0;
  45. }
  46. }
  47. {% endif %}