sandbox-notebookllamalm-nextjs/scripts
Vadym Samoilenko 8c5e01f660 Fix deploy.sh: health check false-failure on --backend-only / --frontend-only
`A && B || C` in bash fires C when A is false (service intentionally
skipped). Replaced with if/fi blocks so || FAILED=1 only triggers
when the health check itself fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 15:18:10 +01:00
..
deploy.sh Fix deploy.sh: health check false-failure on --backend-only / --frontend-only 2026-04-24 15:18:10 +01:00
README.md Fix model IDs, hangs, deploy script, Docker healthchecks 2026-04-24 14:25:30 +01:00
rollback.sh Fix Claude model ID and deploy.sh sudo SSH issue 2026-04-24 14:32:20 +01:00

scripts/

Script Purpose Run frequency
deploy.sh Rolling redeploy: git pull → build → migrate DB → up -d → health check Every push to prod
rollback.sh <sha> Revert to a previous commit and rebuild Emergency only

Deploy

# SSH into optical-web-1 and run:
ssh michael_clervi@optical-web-1
cd /opt/sandbox-notebookllamalm-nextjs
sudo bash scripts/deploy.sh

# Flags:
#   --no-build       restart containers without rebuilding (for env-only changes)
#   --backend-only   rebuild + restart backend only
#   --frontend-only  rebuild + restart frontend only
#   --branch feat/x  deploy a specific branch

Rollback

# Find the SHA you want:
git log --oneline -10

# Roll back:
sudo bash scripts/rollback.sh abc1234

Historical scripts (do not run)

Old one-shot systemd→Docker migration scripts are in Old Readmes/migration-2026-03/. Old pre-Docker systemd scripts are in Old Readmes/pre-docker-systemd/.