Deployment Guide
Deze inhoud is nog niet vertaald.
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.
This page is the shortest setup route. For the full production checklist, see the Self-Hosting Guide.
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, VITE_SUPABASE_PUBLISHABLE_KEY,# and VITE_SUPABASE_PROJECT_ID
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 + Optional Caddy HTTPS
Section titled “Option D: Docker Compose + Optional Caddy HTTPS”v0.6 uses a single docker-compose.yml as the current self-hosted Docker path. If you want HTTPS, enable the optional caddy service that already ships in that file and edit the included Caddyfile for either a public hostname or a LAN-only rollout.
# In docker-compose.yml: uncomment the optional `caddy` service and the# `volumes:` block at the bottom, then change the eryxon-flow service from# `ports: ["80:80"]` to `expose: ["80"]` so Caddy terminates TLS.# Edit the included Caddyfile to match your public domain or LAN host.docker compose up -dDatabase Webhook required. After edge functions are deployed, configure the
notify-new-signupDatabase Webhook in Supabase so new-company signups trigger the notification function. See Self-Hosting Guide Step 7.
Step 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.