149 lines
4.2 KiB
Markdown
149 lines
4.2 KiB
Markdown
# Grav Multi-Site Migration Status
|
|
|
|
**Date:** March 2, 2026
|
|
**Monorepo:** `/home/charles/Projects/tsysstatic/staticsites.turnsys.com/`
|
|
**Remote:** `ssh://git@git.knownelement.com:29418/TSYSGroupCorporate/tsysstaticsites.git`
|
|
**Cloudron Grav:** staticsites.turnsys.com
|
|
|
|
---
|
|
|
|
## Todo List
|
|
|
|
### Completed
|
|
- [x] Flatten pages structure (remove extra pages/ level)
|
|
- [x] Update setup.php to use correct path
|
|
- [x] Commit and push changes to remote
|
|
- [x] Copy setup.php to Cloudron (`/app/data/user/setup.php`)
|
|
- [x] Configure Git Sync plugin
|
|
- [x] Initial sync (content pulled but wiped user/ folder)
|
|
- [x] Reinstall admin plugin
|
|
|
|
### In Progress
|
|
- [ ] Create admin user (run `php bin/grav newuser`)
|
|
|
|
### Pending
|
|
- [ ] Fix Git Sync configuration to only sync `pages/` folder (prevent future wipes)
|
|
- [ ] Clear Grav cache
|
|
- [ ] Test multi-site routing at staticsites.turnsys.com
|
|
- [ ] Add domain aliases in Cloudron for all 21 sites
|
|
- [ ] Test each domain resolves to correct content
|
|
|
|
---
|
|
|
|
## Completed
|
|
|
|
- All 21 sites converted from mdbook to Grav format
|
|
- All repos merged into monorepo (preserves history)
|
|
- Repository structure flattened: `pages/{fqdn}/*` (not `pages/{fqdn}/pages/*`)
|
|
- setup.php created for hostname-based routing
|
|
- Changes committed and pushed to remote
|
|
- Cloudron: setup.php placed at `/app/data/user/setup.php`
|
|
- Cloudron: Git Sync plugin installed and configured
|
|
- Cloudron: Git Sync successfully pulled content
|
|
- Cloudron: Admin plugin reinstalled after Git Sync wipe
|
|
|
|
## Current State
|
|
|
|
### Repository Structure
|
|
```
|
|
pages/
|
|
├── charters.turnsys.com/
|
|
│ ├── 01.home/default.md
|
|
│ └── 02.Bylaws.../default.md
|
|
├── plan.knownelement.com/
|
|
│ └── 01.home/default.md
|
|
└── ... (21 sites total)
|
|
```
|
|
|
|
### Cloudron State
|
|
- Git Sync pulled repo to `/app/data/user/` but synced ROOT not just `pages/`
|
|
- This wiped out accounts, admin, etc.
|
|
- Admin plugin reinstalled
|
|
- Content is in `/app/data/user/pages/` (correct location)
|
|
|
|
## Immediate Next Steps
|
|
|
|
1. **Create admin user:**
|
|
```bash
|
|
su -s /bin/bash www-data -c "cd /app/code && php bin/grav newuser"
|
|
```
|
|
|
|
2. **Fix Git Sync configuration** to only sync `pages/` folder:
|
|
- Check current config: `cat /app/data/user/config/plugins/git-sync.yaml`
|
|
- The `folders` setting should map repo `pages` to `user/pages`
|
|
- May need to reconfigure to prevent future wipes
|
|
|
|
3. **Clear cache:**
|
|
```bash
|
|
cd /app/code && php bin/grav clear-cache
|
|
```
|
|
|
|
4. **Test multi-site routing:**
|
|
- Visit staticsites.turnsys.com (default site)
|
|
- Should route based on hostname to correct pages
|
|
|
|
5. **Add domain aliases in Cloudron** for all 21 sites:
|
|
- charters.turnsys.com
|
|
- plan.afabn.org
|
|
- plan.ap4ap.org
|
|
- plan.ezeda.org
|
|
- plan.ezpodstack.org
|
|
- plan.hfnoc.net
|
|
- plan.knownelement.com
|
|
- plan.meetmorse.com
|
|
- plan.merchantsofhope.org
|
|
- plan.rackrental.net
|
|
- plan.redwfo.com
|
|
- plan.rwscp.net
|
|
- plan.sidedoorgroup.org
|
|
- plan.sol-calc.com
|
|
- plan.startinglineproductions.com
|
|
- plan.suborbital-systems.com
|
|
- plan.teamrental.net
|
|
- plan.thecampustradingcompany.com
|
|
- plan.thepeernet.com
|
|
- plan.turnsys.com
|
|
- plan.yourdreamnamehere.com
|
|
|
|
6. **Test each domain** resolves to correct content
|
|
|
|
---
|
|
|
|
## Key Files
|
|
|
|
| File | Location | Purpose |
|
|
|------|----------|---------|
|
|
| setup.php.cloudron | `/home/charles/Projects/tsysstatic/staticsites.turnsys.com/` | Multi-site routing config for Cloudron |
|
|
| setup.php | `/app/data/user/setup.php` | Active routing config on Cloudron |
|
|
| git-sync.yaml | `/app/data/user/config/plugins/git-sync.yaml` | Git Sync plugin config |
|
|
|
|
## Git Sync Configuration Issue
|
|
|
|
**Problem:** Git Sync synced repo root to `/app/data/user/` instead of just `pages/` to `user/pages/`
|
|
|
|
**Current config:**
|
|
```yaml
|
|
folders:
|
|
- pages
|
|
```
|
|
|
|
This should mean: sync repo's `pages/` folder to `user/pages/`. But it synced everything.
|
|
|
|
**Need to investigate:**
|
|
- Whether Git Sync initialized in wrong location
|
|
- Whether `folders` config is correct
|
|
- May need to reinitialize Git Sync from scratch
|
|
|
|
---
|
|
|
|
## Sites (21 total)
|
|
|
|
| Site | Pages |
|
|
|------|-------|
|
|
| charters.turnsys.com | 199 |
|
|
| plan.knownelement.com | 7 |
|
|
| plan.startinglineproductions.com | 10 |
|
|
| plan.suborbital-systems.com | 2 |
|
|
| 17 other plan.* sites | 1 each |
|
|
| **Total** | 238 |
|