fix: self-hosting UX improvements — setup script, env validation, doc fixes
- Add setup.sh interactive script for guided .env configuration - Add env var validation and placeholder detection to docker-entrypoint.sh - Fix migration count (52 → 63) in SELF-HOSTING.md - Align Docker image name to ghcr.io/erp-mafia/gnubok in docker-compose.yml - Update README and SELF-HOSTING.md to reference setup.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b0de46790a
commit
e93f5e06d5
+15
-3
@@ -26,7 +26,7 @@ gnubok uses passwordless magic link login — the default Supabase email auth se
|
||||
|
||||
## 3. Apply Database Migrations
|
||||
|
||||
The `supabase/migrations/` directory contains 52 ordered SQL files that set up the full schema, including tables, RLS policies, triggers, and functions.
|
||||
The `supabase/migrations/` directory contains 63 ordered SQL files that set up the full schema, including tables, RLS policies, triggers, and functions.
|
||||
|
||||
**Option A — Supabase CLI (recommended):**
|
||||
|
||||
@@ -43,7 +43,7 @@ supabase db push
|
||||
|
||||
**Option B — SQL Editor:**
|
||||
|
||||
Run each file in `supabase/migrations/` in order (001 through 052) in the Supabase SQL Editor. They must be applied sequentially — later migrations depend on earlier ones.
|
||||
Run each file in `supabase/migrations/` in order in the Supabase SQL Editor. They must be applied sequentially — later migrations depend on earlier ones.
|
||||
|
||||
### PostgreSQL Extensions
|
||||
|
||||
@@ -60,6 +60,18 @@ These are all available on Supabase hosted. `pg_cron` requires a paid plan — i
|
||||
|
||||
## 4. Configure Environment
|
||||
|
||||
**Option A — Setup script (recommended):**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/erp-mafia/gnubok.git
|
||||
cd gnubok
|
||||
./setup.sh
|
||||
```
|
||||
|
||||
The script checks prerequisites, prompts for your Supabase credentials, auto-generates `CRON_SECRET`, and writes everything to `.env`.
|
||||
|
||||
**Option B — Manual:**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/erp-mafia/gnubok.git
|
||||
cd gnubok
|
||||
@@ -89,7 +101,7 @@ This starts two containers:
|
||||
|
||||
| Container | Purpose |
|
||||
|-----------|---------|
|
||||
| `app` | Next.js application (pulls `ghcr.io/erp-mafia/gnubok:latest`) |
|
||||
| `app` | Next.js application (`ghcr.io/erp-mafia/gnubok:latest`) |
|
||||
| `cron` | Scheduled jobs via [supercronic](https://github.com/aptible/supercronic) |
|
||||
|
||||
The cron container waits for the app health check to pass before starting.
|
||||
|
||||
Reference in New Issue
Block a user