[Agent][Deploy] - update cmii frontend

This commit is contained in:
zeaslity
2024-07-15 15:16:11 +08:00
parent 83978986b6
commit fd9b809b42
9 changed files with 82 additions and 71 deletions

View File

@@ -54,7 +54,7 @@ spec:
memory: 500Mi
volumeMounts:
- name: nginx-conf
mountPath: /usr/local/nginx/conf/nginx.conf
mountPath: /etc/nginx/conf.d/nginx.conf
subPath: nginx.conf
- name: tenant-prefix
subPath: ingress-config.js

View File

@@ -34,34 +34,19 @@ metadata:
cmii.type: frontend
data:
nginx.conf: |
user root;
worker_processes auto;
server {
listen 9528;
server_name localhost;
gzip on;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
location / {
root /home/cmii-platform/dist;
index index.html index.htm;
}
sendfile on;
keepalive_timeout 600;
server {
listen 9528;
server_name localhost;
gzip on;
location / {
root /home/cmii-platform/dist;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
`

View File

@@ -8,36 +8,22 @@ metadata:
cmii.type: frontend
data:
nginx.conf: |
user root;
worker_processes auto;
server {
listen 9528;
server_name localhost;
gzip on;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
location / {
root /home/cmii-platform/dist;
index index.html index.htm;
}
sendfile on;
keepalive_timeout 600;
server {
listen 9528;
server_name localhost;
gzip on;
location / {
root /home/cmii-platform/dist;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
---
apiVersion: apps/v1
kind: Deployment

View File

@@ -63,14 +63,6 @@ type CommonEnvironmentConfig struct {
ApplyFilePrefix string
}
//func (env *CommonEnvironmentConfig) CompactEnv() {
//
// copySameFields(env, c_app.DefaultCmiiBackendConfig)
// copySameFields(env, c_app.DefaultCmiiFrontendConfig)
//}
//
//
func (env *CommonEnvironmentConfig) ValidateAndUniform() bool {
validate := validator.New()
err := validate.Struct(env)