|
1 | | -# Deploy Eryxon Flow - Essential Steps Only |
| 1 | +# Deploy Eryxon Flow |
2 | 2 |
|
3 | | -Everything is ready. You just need to: |
4 | | -1. Create new Supabase project |
5 | | -2. Configure Cloudflare Pages |
6 | | -3. Deploy |
| 3 | +## Prerequisites |
7 | 4 |
|
8 | | ---- |
| 5 | +- Supabase account |
| 6 | +- Cloudflare account (free tier) |
9 | 7 |
|
10 | | -## Step 1: Create New Supabase Project (10 min) |
| 8 | +## Step 1: Create Supabase Project |
11 | 9 |
|
12 | 10 | ```bash |
13 | | -# 1. Go to supabase.com → Create new project |
14 | | -# - Name: eryxon-flow-production |
15 | | -# - Region: EU (Frankfurt) or US East |
16 | | -# - Password: (generate and save) |
17 | | - |
| 11 | +# 1. Go to supabase.com → Create project |
18 | 12 | # 2. Get credentials from Settings → API: |
19 | 13 | # - Project URL |
20 | | -# - anon/public key |
21 | | -# - Project Ref (the ID before .supabase.co) |
| 14 | +# - anon key |
| 15 | +# - Project Ref |
22 | 16 |
|
23 | | -# 3. Apply database schema |
24 | | -supabase link --project-ref YOUR_PROJECT_REF |
| 17 | +# 3. Apply schema |
| 18 | +supabase link --project-ref YOUR_REF |
25 | 19 | supabase db push |
26 | 20 |
|
27 | | -# 4. Create storage buckets |
| 21 | +# 4. Create storage |
28 | 22 | supabase storage create parts-images |
29 | 23 | supabase storage create issues |
30 | 24 |
|
31 | | -# 5. Deploy Edge Functions |
| 25 | +# 5. Deploy functions |
32 | 26 | supabase functions deploy |
33 | 27 | ``` |
34 | 28 |
|
35 | | -Done! Your database is ready. |
36 | | - |
37 | | ---- |
38 | | - |
39 | | -## Step 2: Deploy to Cloudflare Pages (10 min) |
| 29 | +## Step 2: Deploy to Cloudflare Pages |
40 | 30 |
|
41 | 31 | ```bash |
42 | 32 | # 1. Go to dash.cloudflare.com |
43 | | -# 2. Pages → Create project → Connect to Git |
44 | | -# 3. Select: SheetMetalConnect/eryxon-flow |
45 | | -# 4. Build settings: |
46 | | -# - Framework: Vite |
47 | | -# - Build command: npm run build |
48 | | -# - Build output: dist |
| 33 | +# 2. Pages → Create → Connect Git |
| 34 | +# 3. Select repo |
| 35 | +# 4. Build: npm run build |
| 36 | +# 5. Output: dist |
49 | 37 | ``` |
50 | 38 |
|
51 | | -### Environment Variables (Add in Cloudflare) |
52 | | - |
53 | | -**Production**: |
| 39 | +**Environment Variables** (set in Cloudflare): |
54 | 40 | ``` |
55 | | -VITE_SUPABASE_URL = https://YOUR_PROJECT_REF.supabase.co |
56 | | -VITE_SUPABASE_PUBLISHABLE_KEY = your-anon-key-from-step-1 |
57 | | -VITE_SUPABASE_PROJECT_ID = YOUR_PROJECT_REF |
58 | | -``` |
59 | | - |
60 | | -That's it! Click **Save and Deploy**. |
61 | | - |
62 | | ---- |
63 | | - |
64 | | -## Step 3: Custom Domain (5 min) |
65 | | - |
66 | | -```bash |
67 | | -# In Cloudflare Pages: |
68 | | -# Settings → Custom domains → Add domain |
69 | | -# Enter: app.eryxon.eu |
70 | | - |
71 | | -# DNS (if not already in Cloudflare): |
72 | | -# Add CNAME: app → eryxon-flow.pages.dev |
73 | | - |
74 | | -# SSL is automatic ✓ |
| 41 | +VITE_SUPABASE_URL = https://YOUR_REF.supabase.co |
| 42 | +VITE_SUPABASE_PUBLISHABLE_KEY = your-anon-key |
| 43 | +VITE_SUPABASE_PROJECT_ID = YOUR_REF |
75 | 44 | ``` |
76 | 45 |
|
77 | | ---- |
78 | | - |
79 | | -## Optional: Clean Git History |
80 | | - |
81 | | -Since .env was in git history (old credentials), you can clean it: |
82 | | - |
83 | | -```bash |
84 | | -# Run the cleanup script |
85 | | -./scripts/security/clean-git-history.sh |
86 | | - |
87 | | -# This removes .env and config.toml from ALL history |
88 | | -# WARNING: Rewrites git history! |
89 | | -``` |
90 | | - |
91 | | -Or skip it - you're using a NEW Supabase project anyway! |
92 | | - |
93 | | ---- |
94 | | - |
95 | | -## That's It! |
96 | | - |
97 | | -**Total time**: ~25 minutes |
98 | | - |
99 | | -**Cost**: |
100 | | -- Cloudflare Pages: $0/mo (unlimited) |
101 | | -- Supabase: $0/mo (free tier) or $25/mo (Pro when you scale) |
102 | | - |
103 | | -**What's deployed**: |
104 | | -- ✅ 85 database migrations |
105 | | -- ✅ 28 Edge Functions |
106 | | -- ✅ Complete RLS security |
107 | | -- ✅ Multi-tenant SaaS ready |
108 | | -- ✅ Free tier alpha → Paid tiers later |
109 | | - |
110 | | -**Your URLs**: |
111 | | -- App: `https://app.eryxon.eu` |
112 | | -- Supabase: `https://YOUR_PROJECT_REF.supabase.co` |
113 | | - |
114 | | -**Next**: Open source the repo and launch alpha! |
115 | | - |
116 | | ---- |
| 46 | +## Step 3: Custom Domain |
117 | 47 |
|
118 | | -**All documentation**: See `docs/` for details |
| 48 | +In Cloudflare Pages: |
| 49 | +- Custom domains → Add domain |
| 50 | +- Enter: app.eryxon.eu |
| 51 | +- DNS: CNAME app → eryxon-flow.pages.dev |
119 | 52 |
|
120 | | -**Questions**: See `docs/README.md` for full index |
| 53 | +Done. |
0 commit comments