configmap.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: adm-frontend
  6. namespace: persagy
  7. labels:
  8. name: adm-frontend
  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. # FMS
  44. location /admplus {
  45. try_files $uri $uri/ /adm-frontend/index.html;
  46. }
  47. location @rewrites {
  48. rewrite ^(.+)$ /index.html last;
  49. }
  50. location ~* \.(?:ico|css|js|woff|eot|otf|ttf)$ {
  51. # Some basic cache-control for static files to be sent to the browser
  52. add_header Access-Control-Allow-Origin *;
  53. }
  54. location ~index.html
  55. {
  56. add_header Cache-Control no-cache;
  57. }
  58. }
  59. }
  60. vue.config.js: |
  61. module.exports = {
  62. devServer: {
  63. proxy: {
  64. '/admplus': {
  65. target: 'http://adm-frontend:8838',
  66. },
  67. },
  68. },
  69. }