diff --git a/projects/business/memory/sessions.md b/projects/business/memory/sessions.md index 69a5a5d..2941560 100644 --- a/projects/business/memory/sessions.md +++ b/projects/business/memory/sessions.md @@ -1135,3 +1135,14 @@ - Kept: Stripe `customer.updated` webhook for Pro email sync, `updateEmailByCustomer()` in keys.ts - Commit f5cea97 deployed, verified: /change-email returns 404, zero references in HTML - Free tier users can create new key with new email; Pro users get email synced from Stripe + +## Session 48e — 2026-02-17 11:49 UTC (CRITICAL: Checkout Fix + Systemic Root Cause) +- **CRITICAL BUG: Stripe checkout broken after deploy — FIXED** + - Root cause: No `.env` file on server. docker-compose.yml used `${STRIPE_SECRET_KEY}` variable substitution but nothing provided values. Env vars were never persisted — only worked when manually exported in a shell session. + - Fix: Created persistent `/root/docfast/.env` with STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, DATABASE_PASSWORD + - `.env` already in .gitignore + - Created `scripts/verify-deploy.sh` — checks health + Stripe checkout after every deploy + - Added verify script to CI/CD pipeline (.forgejo/workflows/deploy.yml) + - Container restarted, verification passed: health OK, Stripe checkout returns valid URL + - Commit 73fba68 deployed +- **This was the systemic root cause of recurring checkout failures.** Every `docker compose up -d --build` in a new shell lost the Stripe credentials. Now permanently fixed with `.env` file + CI/CD verification.