configmap.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: dmp-rwd-edit-pages
  6. namespace: persagy
  7. labels:
  8. name: dmp-rwd-edit-pages
  9. data:
  10. nginx.conf: |
  11. #user tony;
  12. worker_processes 4;
  13. error_log /var/log/nginx/error.log;
  14. pid /run/nginx.pid;
  15. worker_rlimit_nofile 100001;
  16. # Load dynamic modules. See /usr/share/nginx/README.dynamic.
  17. include /usr/share/nginx/modules/*.conf;
  18. events {
  19. worker_connections 1024;
  20. }
  21. http {
  22. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  23. '$status $body_bytes_sent "$http_referer" '
  24. '"$http_user_agent" "$http_x_forwarded_for" "$request_time"';
  25. access_log /var/log/nginx/access.log main;
  26. sendfile on;
  27. tcp_nopush on;
  28. tcp_nodelay on;
  29. keepalive_timeout 65;
  30. types_hash_max_size 2048;
  31. include /etc/nginx/mime.types;
  32. default_type application/octet-stream;
  33. gzip on;
  34. gzip_min_length 1k;
  35. gzip_buffers 4 16k;
  36. gzip_http_version 1.1;
  37. gzip_comp_level 2;
  38. gzip_types text/plain application/x-javascript application/css text/css application/xml text/javascript application/x-httpd-php
  39. gzip_vary on;
  40. server {
  41. listen 80 default_server;
  42. root /usr/persagy/saas-web;
  43. location /app {
  44. try_files $uri $uri/ /app/index.html;
  45. }
  46. # FMS
  47. location /fms {
  48. try_files $uri $uri/ /fms/index.html;
  49. }
  50. # FMS
  51. location /rwd-edit-pages {
  52. try_files $uri $uri/ /rwd-edit-pages/index.html;
  53. }
  54. # environmentHealth
  55. location /environmenthealth {
  56. try_files $uri $uri/ /environmenthealth/index.html;
  57. }
  58. # pdfreport
  59. location /pdfreport {
  60. try_files $uri $uri/ /pdfreport/index.html;
  61. }
  62. # BI
  63. location /hedylamarr {
  64. try_files $uri $uri/ /hedylamarr/index.html;
  65. }
  66. #NeueDashboard
  67. location /Dashboard {
  68. try_files $uri $uri/ /Dashboard/index.html;
  69. }
  70. #safetyManagement
  71. location /safetyManagement {
  72. try_files $uri $uri/ /safetyManagement/index.html;
  73. }
  74. location /equiprunmanage{
  75. try_files $uri $uri/ /equiprunmanage/index.html;
  76. }
  77. location /wancity{
  78. try_files $uri $uri/ /wancity/index.html;
  79. }
  80. # energybudget
  81. location /energybudget{
  82. # 不同业务页面路由对应的静态文件首页
  83. try_files $uri $uri/ /energybudget/index.html;
  84. }
  85. # location /api {
  86. # rewrite ^/api/(.*)$ /$1 break;
  87. # proxy_pass http://meos:80;
  88. # }
  89. location @rewrites {
  90. rewrite ^(.+)$ /index.html last;
  91. }
  92. location ~* \.(?:ico|css|js|woff|eot|otf|ttf)$ {
  93. # Some basic cache-control for static files to be sent to the browser
  94. add_header Access-Control-Allow-Origin *;
  95. }
  96. location ~index.html
  97. {
  98. add_header Cache-Control no-cache;
  99. }
  100. }
  101. }
  102. vue.config.js: |
  103. module.exports = {
  104. devServer: {
  105. proxy: {
  106. '/rwdedit': {
  107. //target: 'http://192.168.64.17:8838',
  108. target: 'http://dmp-rwd-edit:8838',
  109. },
  110. },
  111. },
  112. }