Harden webhook and health checks
This commit is contained in:
@@ -20,7 +20,7 @@ services:
|
||||
environment:
|
||||
- VITE_API_BASE_URL=https://test.coppertone.tech/api
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost/"]
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
@@ -83,6 +83,15 @@ show_logs() {
|
||||
podman-compose logs -f --tail 50
|
||||
}
|
||||
|
||||
reload_nginx() {
|
||||
log_info "Reloading nginx..."
|
||||
if /docker/www/scripts/nginx-reload.sh 2>/dev/null; then
|
||||
log_success "Nginx reloaded"
|
||||
else
|
||||
log_warn "Nginx reload failed (non-fatal)"
|
||||
fi
|
||||
}
|
||||
|
||||
full_deploy() {
|
||||
echo "=========================================="
|
||||
echo " Deploying test.coppertone.tech"
|
||||
@@ -98,6 +107,8 @@ full_deploy() {
|
||||
echo ""
|
||||
start_containers
|
||||
echo ""
|
||||
reload_nginx
|
||||
echo ""
|
||||
|
||||
log_success "=========================================="
|
||||
log_success " Deployment complete!"
|
||||
@@ -132,8 +143,11 @@ case "${1:-deploy}" in
|
||||
logs)
|
||||
show_logs
|
||||
;;
|
||||
reload-nginx)
|
||||
reload_nginx
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {deploy|pull|build|restart|stop|start|status|logs}"
|
||||
echo "Usage: $0 {deploy|pull|build|restart|stop|start|status|logs|reload-nginx}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user