docs: add README and update JOURNAL
- Add comprehensive README.md with: - Quick start instructions - Architecture overview - Directory structure - Site inventory table - Production deployment notes - Update JOURNAL.md with project progress - Document completed and pending tasks 🤖 Generated with [Crush](https://crush.cbhops.com) Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
41
JOURNAL.md
41
JOURNAL.md
@@ -15,9 +15,38 @@
|
|||||||
- Container naming convention: `tsysstatic-dev-*`
|
- Container naming convention: `tsysstatic-dev-*`
|
||||||
- Development port: 12000
|
- Development port: 12000
|
||||||
|
|
||||||
### Next Steps
|
### 15:55 - Docker Container Started
|
||||||
- [ ] Start Grav Docker container on port 12000
|
- Started Grav container: `tsysstatic-dev-grav` on port 12000
|
||||||
- [ ] Create /etc/hosts input file for local testing
|
- Created etc-hosts-entries.txt for local testing
|
||||||
- [ ] Configure Grav multi-site structure
|
|
||||||
- [ ] Create per-site environment directories
|
### 16:00 - Multi-Site Structure Created
|
||||||
- [ ] Initialize git repository
|
- Created setup.php for hostname-based environment routing
|
||||||
|
- Created 22 environment directories under user/env/
|
||||||
|
- Each site has: config/, pages/, themes/, data/, accounts/
|
||||||
|
|
||||||
|
### 16:06 - Per-Site Configuration
|
||||||
|
- Created configure-sites.sh script
|
||||||
|
- Generated system.yaml, site.yaml for all sites
|
||||||
|
- Created default home pages for all sites
|
||||||
|
|
||||||
|
### 16:07 - Renamed governance to charters
|
||||||
|
- Renamed governance.turnsys.com to charters.turnsys.com
|
||||||
|
- Updated all configuration files
|
||||||
|
|
||||||
|
### 16:08 - Fixed Stream Initialization Error
|
||||||
|
- setup.php was overriding Grav's core streams incorrectly
|
||||||
|
- Fixed by using GRAV_ENVIRONMENT constant and returning empty array
|
||||||
|
- Container now healthy
|
||||||
|
|
||||||
|
### Completed
|
||||||
|
- [x] Start Grav Docker container on port 12000
|
||||||
|
- [x] Create /etc/hosts input file for local testing
|
||||||
|
- [x] Configure Grav multi-site structure
|
||||||
|
- [x] Create per-site environment directories
|
||||||
|
- [x] Initialize git repository
|
||||||
|
- [x] Create README.md documentation
|
||||||
|
|
||||||
|
### Pending
|
||||||
|
- [ ] Migrate mdbook content to Grav pages
|
||||||
|
- [ ] Test multi-site routing with actual domains
|
||||||
|
- [ ] Deploy to Cloudron
|
||||||
|
|||||||
144
README.md
Normal file
144
README.md
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
# TSYS Static Sites - Grav Multi-Site Installation
|
||||||
|
|
||||||
|
This repository contains the configuration for a Grav CMS multi-site installation hosting 21 static sites, migrated from mdbook.
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
### 1. Add hosts entries
|
||||||
|
|
||||||
|
Add the following to `/etc/hosts`:
|
||||||
|
|
||||||
|
```
|
||||||
|
127.0.0.1 staticsites.turnsys.com
|
||||||
|
127.0.0.1 charters.turnsys.com
|
||||||
|
127.0.0.1 plan.afabn.org
|
||||||
|
127.0.0.1 plan.ap4ap.org
|
||||||
|
127.0.0.1 plan.ezeda.org
|
||||||
|
127.0.0.1 plan.ezpodstack.org
|
||||||
|
127.0.0.1 plan.hfnoc.net
|
||||||
|
127.0.0.1 plan.knownelement.com
|
||||||
|
127.0.0.1 plan.meetmorse.com
|
||||||
|
127.0.0.1 plan.merchantsofhope.org
|
||||||
|
127.0.0.1 plan.rackrental.net
|
||||||
|
127.0.0.1 plan.redwfo.com
|
||||||
|
127.0.0.1 plan.rwscp.net
|
||||||
|
127.0.0.1 plan.sidedoorgroup.org
|
||||||
|
127.0.0.1 plan.sol-calc.com
|
||||||
|
127.0.0.1 plan.suborbital-systems.com
|
||||||
|
127.0.0.1 plan.teamrental.net
|
||||||
|
127.0.0.1 plan.thecampustradingcompany.com
|
||||||
|
127.0.0.1 plan.thepeernet.com
|
||||||
|
127.0.0.1 plan.turnsys.com
|
||||||
|
127.0.0.1 plan.yourdreamnamehere.com
|
||||||
|
127.0.0.1 startinglineproductions.com-bizopprodplan
|
||||||
|
```
|
||||||
|
|
||||||
|
See `etc-hosts-entries.txt` for the complete list.
|
||||||
|
|
||||||
|
### 2. Start the Docker container
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d \
|
||||||
|
--name tsysstatic-dev-grav \
|
||||||
|
-p 12000:80 \
|
||||||
|
-v tsysstatic_grav_data:/var/www/html \
|
||||||
|
--restart unless-stopped \
|
||||||
|
getgrav/grav:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Configure multi-site
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Copy setup.php to container
|
||||||
|
docker cp setup.php tsysstatic-dev-grav:/var/www/html/setup.php
|
||||||
|
docker exec tsysstatic-dev-grav chown www-data:www-data /var/www/html/setup.php
|
||||||
|
|
||||||
|
# Run configuration script
|
||||||
|
docker cp scripts/configure-sites.sh tsysstatic-dev-grav:/tmp/
|
||||||
|
docker exec tsysstatic-dev-grav bash /tmp/configure-sites.sh
|
||||||
|
|
||||||
|
# Clear cache
|
||||||
|
docker exec tsysstatic-dev-grav rm -rf /var/www/html/cache/* /var/www/html/tmp/*
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Access sites
|
||||||
|
|
||||||
|
Open browser to `http://staticsites.turnsys.com:12000` or any other configured domain.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Multi-Site Configuration
|
||||||
|
|
||||||
|
Grav's native environment-based multi-site is used:
|
||||||
|
|
||||||
|
- `setup.php` - Detects hostname and sets `GRAV_ENVIRONMENT` constant
|
||||||
|
- `user/env/{fqdn}/` - Per-site configuration and content directories
|
||||||
|
|
||||||
|
### Directory Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
user/env/{fqdn}/
|
||||||
|
├── config/
|
||||||
|
│ ├── system.yaml # Grav system settings
|
||||||
|
│ └── site.yaml # Site metadata (title, author, etc.)
|
||||||
|
├── pages/ # Site content
|
||||||
|
│ └── 01.home/
|
||||||
|
│ └── default.md
|
||||||
|
├── themes/ # Site-specific themes (optional)
|
||||||
|
├── data/ # Site-specific data files
|
||||||
|
└── accounts/ # Site-specific user accounts
|
||||||
|
```
|
||||||
|
|
||||||
|
### Shared Resources
|
||||||
|
|
||||||
|
- `user/plugins/` - Shared plugins (all sites)
|
||||||
|
- `user/themes/` - Shared themes (fallback if site doesn't have its own)
|
||||||
|
|
||||||
|
## Sites
|
||||||
|
|
||||||
|
| FQDN | Title |
|
||||||
|
|------|-------|
|
||||||
|
| charters.turnsys.com | TSYS Group Charters |
|
||||||
|
| plan.afabn.org | AFABN Business Plan |
|
||||||
|
| plan.ap4ap.org | AP4AP Business Plan |
|
||||||
|
| plan.ezeda.org | EzEDA Business Plan |
|
||||||
|
| plan.ezpodstack.org | EzPodStack Business Plan |
|
||||||
|
| plan.hfnoc.net | High Flight NOC Business Plan |
|
||||||
|
| plan.knownelement.com | Known Element Business Plan |
|
||||||
|
| plan.meetmorse.com | MeetMorse Business Plan |
|
||||||
|
| plan.merchantsofhope.org | Merchants of Hope Business Plan |
|
||||||
|
| plan.rackrental.net | RackRental Business Plan |
|
||||||
|
| plan.redwfo.com | Redwood Family Office Business Plan |
|
||||||
|
| plan.rwscp.net | RWSCP Business Plan |
|
||||||
|
| plan.sidedoorgroup.org | Side Door Group Business Plan |
|
||||||
|
| plan.sol-calc.com | Sol-Calc Business Plan |
|
||||||
|
| plan.suborbital-systems.com | Suborbital Systems Business Plan |
|
||||||
|
| plan.teamrental.net | TeamRental Business Plan |
|
||||||
|
| plan.thecampustradingcompany.com | Campus Trading Company Business Plan |
|
||||||
|
| plan.thepeernet.com | The Peer Network Business Plan |
|
||||||
|
| plan.turnsys.com | TSYS Business Plan |
|
||||||
|
| plan.yourdreamnamehere.com | Your Dream Name Here Business Plan |
|
||||||
|
| startinglineproductions.com-bizopprodplan | Starting Line Productions Business Plan |
|
||||||
|
| staticsites.turnsys.com | TSYS Static Sites (default) |
|
||||||
|
|
||||||
|
## Production Deployment
|
||||||
|
|
||||||
|
For Cloudron deployment:
|
||||||
|
|
||||||
|
1. Deploy Grav app from Cloudron app store to staticsites.turnsys.com
|
||||||
|
2. Copy `setup.php` to the Grav root
|
||||||
|
3. Copy `user/env/` directory structure
|
||||||
|
4. Clear cache
|
||||||
|
|
||||||
|
## Source Content
|
||||||
|
|
||||||
|
Original mdbook content is in sibling directories:
|
||||||
|
|
||||||
|
```
|
||||||
|
../charters.turnsys.com/
|
||||||
|
../plan.afabn.org/
|
||||||
|
../plan.ap4ap.org/
|
||||||
|
... (etc)
|
||||||
|
```
|
||||||
|
|
||||||
|
Content migration from mdbook to Grav format is pending.
|
||||||
Reference in New Issue
Block a user