ci/cd
This commit is contained in:
@@ -8,7 +8,9 @@ app_version=$DRONE_COMMIT
|
||||
echo ${app_version}
|
||||
# 打包编译docker镜像
|
||||
echo '----build image start----'
|
||||
docker build -t smartopsweb:${app_version} .
|
||||
docker build -t smartopsweb:latest .
|
||||
echo '----build image success----'
|
||||
docker run -d -p 8080:80 smartopsweb:${app_version}
|
||||
docker rm -f
|
||||
docker rmi smartopsweb:latest
|
||||
docker run --name smartopsweb -d -p 8080:80 smartopsweb:latest
|
||||
|
||||
|
||||
12
nginx.conf
12
nginx.conf
@@ -29,18 +29,6 @@ http {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
location /api {
|
||||
proxy_pass http://gateway.fateverse.svc.cluster.local:8080;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header Host $host;
|
||||
rewrite "^/api/(.*)$" /$1 break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
}
|
||||
|
||||
location / {
|
||||
root /home/clay;
|
||||
index index.html index.htm;
|
||||
|
||||
Reference in New Issue
Block a user