fix(ci): remove partner-api references and streamline nginx certbot setup for shipping service
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 41s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 41s
This commit is contained in:
parent
03d7f00f17
commit
1cf54dc072
1 changed files with 4 additions and 21 deletions
|
|
@ -45,7 +45,8 @@ jobs:
|
|||
EOF
|
||||
cat << 'EOF' > tmp/nginx-proxy.conf
|
||||
server {
|
||||
server_name beta-shipping.tradhox.com shipping.tradhox.com betashipping-api.tradhox.com shippingservice-api.tradhox.com shippingservice.tipro.in;
|
||||
listen 80;
|
||||
server_name beta-shipping.tradhox.com shipping.tradhox.com betashipping-api.tradhox.com shippingservice-api.tradhox.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8086;
|
||||
|
|
@ -54,18 +55,6 @@ jobs:
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
listen 443 ssl;
|
||||
ssl_certificate /etc/letsencrypt/live/partners-api.tradhox.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/partners-api.tradhox.com/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name beta-shipping.tradhox.com shipping.tradhox.com betashipping-api.tradhox.com shippingservice-api.tradhox.com shippingservice.tipro.in;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
@ -134,14 +123,8 @@ jobs:
|
|||
sudo ln -sf /etc/nginx/sites-available/shippingservice-beta /etc/nginx/sites-enabled/shippingservice-beta
|
||||
sudo nginx -t && (sudo systemctl reload nginx || sudo systemctl restart nginx)
|
||||
|
||||
if [ ! -d "/etc/letsencrypt/live/beta-shipping.tradhox.com" ]; then
|
||||
sudo certbot certonly --nginx -d beta-shipping.tradhox.com --non-interactive --agree-tos --register-unsafely-without-email || true
|
||||
fi
|
||||
|
||||
if [ -d "/etc/letsencrypt/live/beta-shipping.tradhox.com" ]; then
|
||||
sudo sed -i 's|/etc/letsencrypt/live/partners-api.tradhox.com|/etc/letsencrypt/live/beta-shipping.tradhox.com|g' /etc/nginx/sites-available/shippingservice-beta
|
||||
sudo nginx -t && (sudo systemctl reload nginx || sudo systemctl restart nginx)
|
||||
fi
|
||||
sudo certbot --nginx -d beta-shipping.tradhox.com --non-interactive --agree-tos --register-unsafely-without-email --redirect || true
|
||||
sudo nginx -t && (sudo systemctl reload nginx || sudo systemctl restart nginx)
|
||||
|
||||
# ── 10. Cleanup tmp files ───────────────────────────────────────
|
||||
rm -f /tmp/app.tar.gz
|
||||
|
|
|
|||
Loading…
Reference in a new issue