Commit 64c440e
Feature/fly demo (#6)
* docs: add branch naming conventions and workflow to CONTRIBUTING
- Branch prefixes: feature/, bugfix/, hotfix/, chore/, docs/, release/
- Workflow: rebase from main, push, PR
- Conventional commit format with examples
- Test requirements before PR
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(demo): Fly.io demo instance — combined container, rich seed data, hourly reset
fly/Dockerfile: multi-stage build (node + go → nginx:alpine), single container
fly/nginx.fly.conf: proxies /api/ to localhost:3000
fly/entrypoint.sh: restart loop for backend + crond for hourly reset
fly/reset.sh: copies seed snapshot → live DB, kills backend (auto-restarts)
fly/SETUP.md: step-by-step deploy guide
fly.toml: fra region, 512MB shared VM, persistent volume at /app/data
seed/demo_data.go: goroutine that waits for exercises then seeds:
- PPL program (6 days: Push/Pull/Legs A+B)
- 8 weeks of workouts with linear weight progression
- 90 days of weight logs (~185 to 173 lbs with daily noise)
- 7 days of food logs (~2400 kcal/day)
Idempotent — skips if data already exists
main.go: go seed.DemoData(db.DB)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(fly): add comments to demo infra + README live demo section
Documents the single-container Fly.io architecture (nginx + Go backend +
crond hourly reset) inline in Dockerfile, entrypoint.sh, and reset.sh.
README gets a Live Demo section with link, credentials, and a note that
visitors can register their own account on the shared instance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 883f502 commit 64c440e
10 files changed
Lines changed: 690 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
6 | 63 | | |
7 | 64 | | |
8 | 65 | | |
9 | | - | |
| 66 | + | |
10 | 67 | | |
11 | 68 | | |
12 | 69 | | |
13 | | - | |
| 70 | + | |
14 | 71 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 72 | + | |
19 | 73 | | |
20 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
21 | 77 | | |
22 | 78 | | |
23 | | - | |
24 | | - | |
| 79 | + | |
| 80 | + | |
25 | 81 | | |
26 | | - | |
27 | | - | |
| 82 | + | |
| 83 | + | |
28 | 84 | | |
29 | 85 | | |
30 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
31 | 89 | | |
32 | | - | |
| 90 | + | |
33 | 91 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
37 | 95 | | |
38 | 96 | | |
39 | 97 | | |
40 | | - | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
74 | 89 | | |
75 | 90 | | |
76 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments