Commit Graph
2 Commits
Author SHA1 Message Date
GandClaude Opus 4.8 567b0c845e fix(deploy): pwd -P in shared launch.sh + 60s health poll (#69)
Two lessons from the first live release-deploy (vitareba, 2026-07-17):
- /opt/<name>/app is now a symlink; launch.sh's logical pwd made `find` not
  descend it → server.js not found → crash loop (~6 min downtime, hotfixed on
  the box). The bootstrap now normalizes pwd → pwd -P idempotently for every
  app so no other first release-deploy can hit it.
- The single sleep-4 health sample read 'activating/000' on a normal Next cold
  boot — a false negative that would auto-rollback healthy deploys. Both
  deploy.sh and rollback.sh now poll up to 60s, breaking early on healthy or
  on 'failed' (real crash-loop).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 18:48:53 +02:00
GandClaude Opus 4.8 7adaf874cc feat(deploy): CI-gated deploys, atomic releases + rollback, prisma migrations, fleetcrown schema step (#68)
Four DevOps hardening pieces (A+ run):
- ci-gate.sh + hook template: push-deploys WAIT for GitHub CI on the pushed
  commit and are BLOCKED on red — prod only receives what CI verified
  (was: deploy raced CI; only bypassable local hooks gated prod).
- deploy.sh: releases layout — /opt/<name>/releases/<ts>-<sha> + atomic
  app-symlink swap (units unchanged), shared/{.env,launch.sh}, keep-3 prune,
  AUTO-ROLLBACK on failed health check. Legacy dirs migrate in place.
- rollback.sh: one-command flip to previous/named release + restart + health.
- apply-schema.sh: prisma branch (prisma migrate deploy when prisma/migrations
  exists) — covers aoz/datacat (tracked) + reparaturbonus/solon (baselined +
  resolved on prod today).
- deploy-hetzner.sh: fleetcrown itself now schema-gates via the shared applier
  (39-file set; drizzle journal desync documented in-line — number new
  migrations by hand 0040+ until reconciled).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 18:39:45 +02:00