feat: password gate + docker/nginx deploy setup #1

Merged
john merged 2 commits from feat/password-gate-and-docker-deploy into dev 2026-04-15 15:59:48 +00:00
Owner

Summary

  • Wraps the SPA in a <PasswordGate> component (sessionStorage-backed) so the demo can be shared via URL + password (openinnovation2026)
  • Adds multi-stage Dockerfile (node 22 build → nginx 1.27 static serve) and nginx.conf with SPA fallback + asset caching
  • Repo migrated from github.com/haskytech-basic/EduOne to forgejo.haskytech.com/haskytech/eduone (old GitHub remote preserved as github-source locally only)

Verified locally

  • npm run build — tsc + vite both green
  • docker build -t eduone-test . — 79MB image
  • docker run smoke test — nginx serves / with HTTP 200

Deploy Runbook

After merging this PR (feat → dev) and then dev → main, deploy on Coolify:

  1. Coolify → New Resource → Public Repository → http://forgejo.haskytech.com:3000/haskytech/eduone
  2. Build pack: Dockerfile
  3. Branch: main
  4. Domain: eduone.haskytech.com (or chosen subdomain — needs DNS A record to homelab tunnel)
  5. Port: 80
  6. No env vars required
  7. Deploy → verify password screen → enter openinnovation2026 → confirm SPA loads

Notes

  • Password is client-side only (plaintext in the JS bundle after minification). Intentional for a demo. Swap to Traefik basic auth if real access control is needed.
  • Bundle is 764KB gzipped (recharts + react-pdf). Acceptable for a demo.
## Summary - Wraps the SPA in a `<PasswordGate>` component (sessionStorage-backed) so the demo can be shared via URL + password (`openinnovation2026`) - Adds multi-stage `Dockerfile` (node 22 build → nginx 1.27 static serve) and `nginx.conf` with SPA fallback + asset caching - Repo migrated from `github.com/haskytech-basic/EduOne` to `forgejo.haskytech.com/haskytech/eduone` (old GitHub remote preserved as `github-source` locally only) ## Verified locally - [x] `npm run build` — tsc + vite both green - [x] `docker build -t eduone-test .` — 79MB image - [x] `docker run` smoke test — nginx serves `/` with HTTP 200 ## Deploy Runbook After merging this PR (feat → dev) and then dev → main, deploy on Coolify: 1. Coolify → New Resource → Public Repository → `http://forgejo.haskytech.com:3000/haskytech/eduone` 2. Build pack: **Dockerfile** 3. Branch: `main` 4. Domain: `eduone.haskytech.com` (or chosen subdomain — needs DNS A record to homelab tunnel) 5. Port: `80` 6. No env vars required 7. Deploy → verify password screen → enter `openinnovation2026` → confirm SPA loads ## Notes - Password is **client-side only** (plaintext in the JS bundle after minification). Intentional for a demo. Swap to Traefik basic auth if real access control is needed. - Bundle is 764KB gzipped (recharts + react-pdf). Acceptable for a demo.
Adds a sessionStorage-backed access gate over the SPA so the demo
can be shared via a single URL + password. Also adds a multi-stage
Dockerfile (node build → nginx static serve) and nginx.conf with
SPA fallback routing, ready for Coolify deploy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
john merged commit acd73d1805 into dev 2026-04-15 15:59:48 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
haskytech/eduone!1
No description provided.