ci: k8s部署

This commit is contained in:
zhangjialin
2022-03-09 17:36:11 +08:00
parent 186c234c62
commit d7a776d626
4 changed files with 227 additions and 0 deletions

47
devops/nginx.conf Normal file
View File

@@ -0,0 +1,47 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost; #你的serverName
location / {
root /opt/nginx/html/web;
index index.html;
}
# 代理转发请求至网关prod-api标识解决跨域问题
location /prod-api/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_pass http://ks.howlaisi.com:32006/;
proxy_pass http://youlai-gateway-svc.youlai-mall.svc.cluster.local:9999/;
}
# 重定向错误页面到 /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}