Deployment Guide
Deployment Guide
Section titled “Deployment Guide”Want to try it first? Open the hosted version at app.eryxon.eu before deploying your own instance. It remains online as-is.
Quick Start (Automated)
Section titled “Quick Start (Automated)”The fastest way to deploy Eryxon Flow:
chmod +x scripts/setup.sh./scripts/setup.shThis interactive script handles all setup steps. For manual setup, continue reading.
Prerequisites
Section titled “Prerequisites”- Node.js 20+
- Supabase CLI
- A Supabase project
Step 1: Supabase Setup
Section titled “Step 1: Supabase Setup”Create Project
Section titled “Create Project”- Go to supabase.com and create a new project
- Note your Project URL, anon key, and service role key from Settings > API
Apply Database Schema
Section titled “Apply Database Schema”cp .env.example .env# Fill in VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY
supabase link --project-ref <your-project-ref>supabase db pushSet Up Storage & Cron Jobs
Section titled “Set Up Storage & Cron Jobs”# Apply via SQL Editor in Supabase Dashboard, or:supabase db execute < supabase/seed.sqlThis creates storage buckets (parts-images, issues, parts-cad, batch-images) and schedules cron jobs.
Deploy Edge Functions
Section titled “Deploy Edge Functions”supabase functions deploySet Edge Function Secrets
Section titled “Set Edge Function Secrets”supabase secrets set \ SUPABASE_URL=<your-project-url> \ SUPABASE_SERVICE_ROLE_KEY=<your-service-role-key>Optional secrets:
| Secret | Purpose |
|---|---|
| RESEND_API_KEY | Email invitations via Resend |
| APP_URL | Base URL for invitation links |
| EMAIL_FROM | Sender email for invitations |
| CRON_SECRET | Auth for monthly-reset-cron |
| SELF_HOSTED_MODE | Set to “true” for self-hosted mode |
Step 2: Deploy Frontend
Section titled “Step 2: Deploy Frontend”Option A: Local Development
Section titled “Option A: Local Development”npm cinpm run devOption B: Cloudflare Pages
Section titled “Option B: Cloudflare Pages”- Connect your Git repository to Cloudflare Pages
- Build command:
npm run build - Output directory:
dist - Add environment variables in Cloudflare Pages settings
Option C: Docker
Section titled “Option C: Docker”docker build \ --build-arg VITE_SUPABASE_URL=<url> \ --build-arg VITE_SUPABASE_PUBLISHABLE_KEY=<key> \ --build-arg VITE_SUPABASE_PROJECT_ID=<project-id> \ -t eryxon-flow .
docker run -p 80:80 eryxon-flowOption D: Docker Compose (Production with SSL)
Section titled “Option D: Docker Compose (Production with SSL)”# Edit Caddyfile - replace domain with yours# Edit docker-compose.prod.yml if neededdocker compose -f docker-compose.prod.yml up -dStep 3: First Login
Section titled “Step 3: First Login”- Navigate to your deployment URL
- Click “Sign Up” to create the first admin account
- The first user automatically becomes admin with their own tenant
Optional: Cloudflare Turnstile (CAPTCHA)
Section titled “Optional: Cloudflare Turnstile (CAPTCHA)”Turnstile is optional. Without it, auth works but without bot protection.
To enable:
- Create a Turnstile widget at Cloudflare Dashboard
- Set
VITE_TURNSTILE_SITE_KEYin your environment - Configure the Turnstile secret key in Supabase Dashboard > Auth > Captcha
- On Vercel, keep the repo
vercel.jsonso SPA rewrites and CSP headers continue to allowhttps://challenges.cloudflare.com
Verification
Section titled “Verification”Run the verification script to check your setup:
chmod +x scripts/verify-setup.sh./scripts/verify-setup.shFull Documentation
Section titled “Full Documentation”See the Self-Hosting Guide for the complete rollout, troubleshooting, and environment notes.