Deployment Testing
Support Matrix
Section titled “Support Matrix”| Feature | Status | File |
|---|---|---|
| GitHub Pages | ✅ | .github/workflows/build.yml |
| files.json | ✅ | content/files.json |
| Docker | ✅ | Dockerfile, docker-compose.yml |
| Supervisor | ✅ | deployment/supervisor/snapcode.conf |
| 3-Tier Fallback | ✅ | index.html loadFolder() |
3-Tier Fallback System
Section titled “3-Tier Fallback System”async loadFolder(folder) { // Tier 1: files.json (GitHub Pages) const json = await fetch(`${folder}/files.json`); if (json.ok) return;
// Tier 2: API (Local server) const api = await fetch(`/api/files/${folder}`); if (api.ok) return;
// Tier 3: Hardcoded (Fallback) return hardcodedFiles[folder];}Test Scenarios
Section titled “Test Scenarios”Test 1: Pure Static
Section titled “Test 1: Pure Static”open index.html# ✅ App loads, uses hardcoded listTest 2: With files.json
Section titled “Test 2: With files.json”python3 -m http.server 8000# ✅ Loads from files.jsonTest 3: With Python Server
Section titled “Test 3: With Python Server”python3 server.py# ✅ Loads from /api/files/Test 4: Docker
Section titled “Test 4: Docker”docker-compose up -d# ✅ Container starts, health check passesTest 5: GitHub Pages
Section titled “Test 5: GitHub Pages”git push origin main# ✅ Actions runs, deploys, works with files.jsonDeployment Method Support
Section titled “Deployment Method Support”| Method | Command | Files Needed |
|---|---|---|
| Direct Open | open index.html | index.html only |
| Static Server | python3 -m http.server | + files.json |
| GitHub Pages | git push | + .github/workflows |
| Docker | docker-compose up | + Dockerfile |
| Supervisor | supervisorctl start | + supervisor conf |
Conclusion
Section titled “Conclusion”All deployment methods supported! The 3-tier fallback automatically adapts:
- GitHub Pages → files.json
- Local server → API
- Direct open → hardcoded