Add in cloudflare ddns and restructure repo

This commit is contained in:
James Thompson
2026-05-19 08:30:25 +00:00
parent c546fab5e1
commit 6fb3fc65e4
35 changed files with 132 additions and 131 deletions

View File

@@ -4,12 +4,11 @@ Auto-generate markdown docs from docker-compose.yml files.
Usage: python3 scripts/generate_docs.py
"""
import yaml
import os
import sys
from pathlib import Path
REPO_ROOT = Path(__file__).parent.parent
SERVICES_DIR = REPO_ROOT
SERVICES_DIR = REPO_ROOT / "services"
DOCS_DIR = REPO_ROOT / "docs" / "services"
DISPLAY_NAME_OVERRIDES = {
@@ -175,6 +174,8 @@ def format_security(sec):
def generate_service_md(service_name, service_dir):
"""Generate service doc that includes docker-compose.yml, Dockerfile, README, and .env.example."""
include_base = f"services/{service_dir.name}"
lines = []
lines.append(f"# {service_name}")
lines.append("")
@@ -183,7 +184,7 @@ def generate_service_md(service_name, service_dir):
# Include README.md first if exists
readme_path = service_dir / "README.md"
if readme_path.exists():
lines.append(f'--8<-- "{service_dir.name}/README.md"')
lines.append(f'--8<-- "{include_base}/README.md"')
lines.append("> Below are the configuration files for this service. For details on how to deploy or customize, refer to the README above or the official documentation for the service.")
# Include docker-compose.yml
@@ -192,7 +193,7 @@ def generate_service_md(service_name, service_dir):
lines.append("## Docker Compose Configuration")
lines.append("")
lines.append("```yaml")
lines.append(f'--8<-- "{service_dir.name}/docker-compose.yml"')
lines.append(f'--8<-- "{include_base}/docker-compose.yml"')
lines.append("```")
lines.append("")
@@ -202,7 +203,7 @@ def generate_service_md(service_name, service_dir):
lines.append("## Dockerfile")
lines.append("")
lines.append("```dockerfile")
lines.append(f'--8<-- "{service_dir.name}/Dockerfile"')
lines.append(f'--8<-- "{include_base}/Dockerfile"')
lines.append("```")
lines.append("")
@@ -212,7 +213,7 @@ def generate_service_md(service_name, service_dir):
lines.append("## Environment Variables (`.env.example`)")
lines.append("")
lines.append("```bash")
lines.append(f'--8<-- "{service_dir.name}/.env.example"')
lines.append(f'--8<-- "{include_base}/.env.example"')
lines.append("```")
lines.append("")
@@ -275,6 +276,10 @@ def cleanup_stale_service_docs(service_names):
def main():
if not SERVICES_DIR.exists():
print(f"Services directory not found: {SERVICES_DIR}", file=sys.stderr)
return
all_services = {}
# Find all service directories with docker-compose.yml
@@ -284,9 +289,6 @@ def main():
compose_file = item / "docker-compose.yml"
if not compose_file.exists():
continue
# Skip scripts/docs directories
if item.name in ("scripts", "docs", "__pycache__"):
continue
service_name = item.name
try: