generated from vignesh/searchengine
fix(ssl): configure betapayments.tradhox.com certificate and remove partner-api fallback
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 34s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 34s
This commit is contained in:
parent
493b204d32
commit
852aa0ad33
1 changed files with 2 additions and 8 deletions
|
|
@ -119,19 +119,13 @@ jobs:
|
||||||
}
|
}
|
||||||
|
|
||||||
# ── 5. Ensure SSL Certificate Exists for betapayments.tradhox.com ─
|
# ── 5. Ensure SSL Certificate Exists for betapayments.tradhox.com ─
|
||||||
if [ ! -d "/etc/letsencrypt/live/betapayments.tradhox.com" ]; then
|
if [ ! -f "/etc/letsencrypt/live/betapayments.tradhox.com/fullchain.pem" ]; then
|
||||||
echo "Requesting SSL certificate for betapayments.tradhox.com..."
|
echo "Requesting SSL certificate for betapayments.tradhox.com..."
|
||||||
sudo systemctl stop nginx || true
|
sudo systemctl stop nginx || true
|
||||||
sudo certbot certonly --standalone -d betapayments.tradhox.com --non-interactive --agree-tos --register-unsafely-without-email || true
|
sudo certbot certonly --standalone -d betapayments.tradhox.com --non-interactive --agree-tos -m devops@tradhox.com || true
|
||||||
sudo systemctl start nginx || true
|
sudo systemctl start nginx || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fallback if certificate was not created
|
|
||||||
if [ ! -f "/etc/letsencrypt/live/betapayments.tradhox.com/fullchain.pem" ]; then
|
|
||||||
echo "Warning: betapayments.tradhox.com cert not present, falling back to existing partner cert temporarily..."
|
|
||||||
sed -i 's|/etc/letsencrypt/live/betapayments.tradhox.com|/etc/letsencrypt/live/betapartner-api.tradhox.com|g' /tmp/nginx-proxy.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ── 6. Nginx Config ───────────────────────────────────────────
|
# ── 6. Nginx Config ───────────────────────────────────────────
|
||||||
sudo cp /tmp/nginx-proxy.conf /etc/nginx/sites-available/paymentservice
|
sudo cp /tmp/nginx-proxy.conf /etc/nginx/sites-available/paymentservice
|
||||||
sudo ln -sf /etc/nginx/sites-available/paymentservice /etc/nginx/sites-enabled/paymentservice
|
sudo ln -sf /etc/nginx/sites-available/paymentservice /etc/nginx/sites-enabled/paymentservice
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue