sandbox-notebookllamalm-nextjs/scripts
Vadym Samoilenko 954e05e01e Fix docker compose up blocking on frontend healthcheck
- frontend depends_on: service_started (not service_healthy) — docker compose
  up -d now returns once containers start, not after full health chain resolves
- frontend healthcheck: use node HTTP check (wget/curl not in alpine runner)
- start_period: 60s (Next.js can take time on first request)
- on_error: show 60 log lines instead of 30

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 14:57:12 +01:00
..
deploy.sh Fix docker compose up blocking on frontend healthcheck 2026-04-24 14:57:12 +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/.