Ga naar inhoud

Deployment Guide

Deze inhoud is nog niet vertaald.

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.

The fastest way to deploy Eryxon Flow:

Terminal window
chmod +x scripts/setup.sh
./scripts/setup.sh

This interactive script handles all setup steps. For manual setup, continue reading.

  1. Go to supabase.com and create a new project
  2. Note your Project URL, anon key, and service role key from Settings > API
Terminal window
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 push
Terminal window
# Apply via SQL Editor in Supabase Dashboard, or:
supabase db execute < supabase/seed.sql

This creates storage buckets (parts-images, issues, parts-cad, batch-images) and schedules cron jobs.

Terminal window
supabase functions deploy
Terminal window
supabase secrets set \
SUPABASE_URL=<your-project-url> \
SUPABASE_SERVICE_ROLE_KEY=<your-service-role-key>

Optional secrets:

SecretPurpose
RESEND_API_KEYEmail invitations via Resend
APP_URLBase URL for invitation links
EMAIL_FROMSender email for invitations
CRON_SECRETAuth for monthly-reset-cron
SELF_HOSTED_MODESet to “true” for self-hosted mode
Terminal window
npm ci
npm run dev
  1. Connect your Git repository to Cloudflare Pages
  2. Build command: npm run build
  3. Output directory: dist
  4. Add environment variables in Cloudflare Pages settings
Terminal window
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-flow

Option 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.

Terminal window
# 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 -d

Database Webhook required. After edge functions are deployed, configure the notify-new-signup Database Webhook in Supabase so new-company signups trigger the notification function. See Self-Hosting Guide Step 7.

  1. Navigate to your deployment URL
  2. Click “Sign Up” to create the first admin account
  3. The first user automatically becomes admin with their own tenant

Turnstile is optional. Without it, auth works but without bot protection.

To enable:

  1. Create a Turnstile widget at Cloudflare Dashboard
  2. Set VITE_TURNSTILE_SITE_KEY in your environment
  3. Configure the Turnstile secret key in Supabase Dashboard > Auth > Captcha
  4. On Vercel, keep the repo vercel.json so SPA rewrites and CSP headers continue to allow https://challenges.cloudflare.com

Run the verification script to check your setup:

Terminal window
chmod +x scripts/verify-setup.sh
./scripts/verify-setup.sh

See the Self-Hosting Guide for the complete rollout, troubleshooting, and environment notes.