You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ragflow_config.yaml 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: nginx-config
  6. data:
  7. ragflow.conf: |
  8. server {
  9. listen 80;
  10. server_name _;
  11. root /ragflow/web/dist;
  12. gzip on;
  13. gzip_min_length 1k;
  14. gzip_comp_level 9;
  15. gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
  16. gzip_vary on;
  17. gzip_disable "MSIE [1-6]\.";
  18. location ~ ^/(v1|api) {
  19. proxy_pass http://localhost:9380;
  20. include proxy.conf;
  21. }
  22. location / {
  23. index index.html;
  24. try_files $uri $uri/ /index.html;
  25. }
  26. # Cache-Control: max-age~@~AExpires
  27. location ~ ^/static/(css|js|media)/ {
  28. expires 10y;
  29. access_log off;
  30. }
  31. }
  32. proxy.conf: |
  33. proxy_set_header Host $host;
  34. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35. proxy_set_header X-Forwarded-Proto $scheme;
  36. proxy_http_version 1.1;
  37. proxy_set_header Connection "";
  38. proxy_buffering off;
  39. proxy_read_timeout 3600s;
  40. proxy_send_timeout 3600s;
  41. nginx.conf: |
  42. user root;
  43. worker_processes auto;
  44. error_log /var/log/nginx/error.log notice;
  45. pid /var/run/nginx.pid;
  46. events {
  47. worker_connections 1024;
  48. }
  49. http {
  50. include /etc/nginx/mime.types;
  51. default_type application/octet-stream;
  52. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  53. '$status $body_bytes_sent "$http_referer" '
  54. '"$http_user_agent" "$http_x_forwarded_for"';
  55. access_log /var/log/nginx/access.log main;
  56. sendfile on;
  57. #tcp_nopush on;
  58. keepalive_timeout 65;
  59. #gzip on;
  60. client_max_body_size 128M;
  61. include /etc/nginx/conf.d/ragflow.conf;
  62. }