feat: initialize Grav multi-site project
- Add AGENTS.md with project requirements and site inventory
- Add JOURNAL.md for project tracking
- Add etc-hosts-entries.txt for local testing (22 domains)
- Add setup.php for Grav multi-site routing configuration
This project migrates 21 mdbook sites to a single Grav multi-site
installation. Each site will have its own environment directory under
user/env/{fqdn}/ with independent config, pages, and themes.
Development runs in Docker on port 12000 (container: tsysstatic-dev-grav).
Production target: Cloudron Grav app at staticsites.turnsys.com.
🤖 Generated with [Crush](https://crush.cbhops.com)
Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
55
AGENTS.md
Normal file
55
AGENTS.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# TSYS Static Sites - Grav Multi-Site Project
|
||||
|
||||
## Requirements
|
||||
|
||||
### Infrastructure
|
||||
- Grav CMS multi-site installation for hosting static content
|
||||
- Currently migrating from mdbook-based sites
|
||||
- Target production: Cloudron LAMP app at staticsites.turnsys.com
|
||||
- Development: Docker container on port 12000, named with prefix `tsysstatic-dev-`
|
||||
|
||||
### Source Content
|
||||
- 21 mdbook repositories in `/home/charles/Projects/tsysstatic/`
|
||||
- Directory name = FQDN for the site
|
||||
- All sites use standard mdbook structure (book.toml, src/, SUMMARY.md)
|
||||
|
||||
### Multi-Site Strategy
|
||||
- Single Grav installation hosting multiple domains
|
||||
- Each site can have its own git repository for content (per-site repos preferred)
|
||||
- Use Grav's environment-based multi-site feature (user/env/{fqdn}/)
|
||||
- Domain-based routing via setup.php
|
||||
|
||||
### Sites to Migrate
|
||||
1. governance.turnsys.com (substantial content - governance docs)
|
||||
2. plan.ap4ap.org
|
||||
3. plan.ezeda.org
|
||||
4. plan.afabn.org
|
||||
5. plan.ezpodstack.org
|
||||
6. plan.hfnoc.net
|
||||
7. plan.knownelement.com (substantial content - KNEL docs)
|
||||
8. plan.meetmorse.com
|
||||
9. plan.merchantsofhope.org
|
||||
10. plan.rackrental.net
|
||||
11. plan.redwfo.com
|
||||
12. plan.rwscp.net
|
||||
13. plan.sidedoorgroup.org
|
||||
14. plan.sol-calc.com
|
||||
15. plan.suborbital-systems.com (has chapter content)
|
||||
16. plan.teamrental.net
|
||||
17. plan.thecampustradingcompany.com
|
||||
18. plan.thepeernet.com
|
||||
19. plan.turnsys.com
|
||||
20. plan.yourdreamnamehere.com
|
||||
21. startinglineproductions.com-bizopprodplan (substantial content - STLP plans)
|
||||
|
||||
### Development Workflow
|
||||
1. Local Docker container for development/testing
|
||||
2. /etc/hosts entries for local domain testing
|
||||
3. Git repository for Grav configuration and content
|
||||
4. Sync to Cloudron Grav instance for production
|
||||
|
||||
### Technical Constraints
|
||||
- Use only: docker, git, and unix utilities on host
|
||||
- No AI/ML tools or language servers for file manipulation
|
||||
- Container naming: `tsysstatic-dev-*` prefix
|
||||
- Port: 12000
|
||||
23
JOURNAL.md
Normal file
23
JOURNAL.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Project Journal
|
||||
|
||||
## 2026-03-02
|
||||
|
||||
### 15:52 - Project Initiated
|
||||
- Explored existing mdbook repositories (21 sites found)
|
||||
- Researched Grav multi-site capabilities:
|
||||
- Grav supports environment-based multi-site via `user/env/{hostname}/`
|
||||
- Each site can have independent git repository
|
||||
- Domain routing via setup.php or environment variables
|
||||
- Researched Grav Docker setup: `getgrav/grav:latest` image
|
||||
|
||||
### 15:53 - Requirements Captured
|
||||
- Created AGENTS.md with project requirements
|
||||
- Container naming convention: `tsysstatic-dev-*`
|
||||
- Development port: 12000
|
||||
|
||||
### Next Steps
|
||||
- [ ] Start Grav Docker container on port 12000
|
||||
- [ ] Create /etc/hosts input file for local testing
|
||||
- [ ] Configure Grav multi-site structure
|
||||
- [ ] Create per-site environment directories
|
||||
- [ ] Initialize git repository
|
||||
29
etc-hosts-entries.txt
Normal file
29
etc-hosts-entries.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
# TSYS Static Sites - /etc/hosts entries for local testing
|
||||
# Add these lines to your /etc/hosts file to test multi-site functionality
|
||||
# All domains point to localhost (127.0.0.1) on port 12000
|
||||
|
||||
# Grav development server (access via http://localhost:12000)
|
||||
127.0.0.1 staticsites.turnsys.com
|
||||
|
||||
# Multi-site domains (access via http://fqdn:12000 after adding to hosts)
|
||||
127.0.0.1 governance.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
|
||||
72
setup.php
Normal file
72
setup.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* Grav Multi-Site Setup Configuration
|
||||
* Maps hostnames to environment-specific directories
|
||||
*/
|
||||
|
||||
$hostname = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
|
||||
$hostname = preg_replace('/:\d+$/', '', $hostname);
|
||||
$hostname = strtolower($hostname);
|
||||
|
||||
$hostMap = [
|
||||
'governance.turnsys.com' => 'governance.turnsys.com',
|
||||
'plan.afabn.org' => 'plan.afabn.org',
|
||||
'plan.ap4ap.org' => 'plan.ap4ap.org',
|
||||
'plan.ezeda.org' => 'plan.ezeda.org',
|
||||
'plan.ezpodstack.org' => 'plan.ezpodstack.org',
|
||||
'plan.hfnoc.net' => 'plan.hfnoc.net',
|
||||
'plan.knownelement.com' => 'plan.knownelement.com',
|
||||
'plan.meetmorse.com' => 'plan.meetmorse.com',
|
||||
'plan.merchantsofhope.org' => 'plan.merchantsofhope.org',
|
||||
'plan.rackrental.net' => 'plan.rackrental.net',
|
||||
'plan.redwfo.com' => 'plan.redwfo.com',
|
||||
'plan.rwscp.net' => 'plan.rwscp.net',
|
||||
'plan.sidedoorgroup.org' => 'plan.sidedoorgroup.org',
|
||||
'plan.sol-calc.com' => 'plan.sol-calc.com',
|
||||
'plan.suborbital-systems.com' => 'plan.suborbital-systems.com',
|
||||
'plan.teamrental.net' => 'plan.teamrental.net',
|
||||
'plan.thecampustradingcompany.com' => 'plan.thecampustradingcompany.com',
|
||||
'plan.thepeernet.com' => 'plan.thepeernet.com',
|
||||
'plan.turnsys.com' => 'plan.turnsys.com',
|
||||
'plan.yourdreamnamehere.com' => 'plan.yourdreamnamehere.com',
|
||||
'startinglineproductions.com-bizopprodplan' => 'startinglineproductions.com-bizopprodplan',
|
||||
'staticsites.turnsys.com' => 'staticsites.turnsys.com',
|
||||
];
|
||||
|
||||
$envDir = isset($hostMap[$hostname]) ? $hostMap[$hostname] : 'staticsites.turnsys.com';
|
||||
$envPath = GRAV_ROOT . '/user/env/' . $envDir;
|
||||
|
||||
if (!is_dir($envPath)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
'streams' => [
|
||||
'schemes' => [
|
||||
'config' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => ['' => [$envPath . '/config', 'user://config']],
|
||||
],
|
||||
'pages' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => ['' => [$envPath . '/pages']],
|
||||
],
|
||||
'themes' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => ['' => [$envPath . '/themes', 'user://themes']],
|
||||
],
|
||||
'plugins' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => ['' => [$envPath . '/plugins', 'user://plugins']],
|
||||
],
|
||||
'data' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => ['' => [$envPath . '/data', 'user://data']],
|
||||
],
|
||||
'accounts' => [
|
||||
'type' => 'ReadOnlyStream',
|
||||
'prefixes' => ['' => [$envPath . '/accounts', 'user://accounts']],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user