#!/bin/bash set -euo pipefail APP=/opt/ai-fresh-delivery cd "$APP/server" echo "===== deploy nginx api proxy =====" sudo cp "$APP/deploy/nginx.api-proxy.conf" /tmp/nginx.api-proxy.conf 2>/dev/null || true if [ -f /tmp/nginx.api-proxy.conf ]; then sudo bash "$APP/scripts/setup-prod-api-nginx.sh" /tmp/nginx.api-proxy.conf else echo "nginx config missing, skip" fi echo "===== nginx test =====" curl -sS -m 5 http://127.0.0.1/api/health || true echo