Architecture
Product shape
edox-ops is a Typer CLI that orchestrates host preparation, per-project nginx
configuration, static deploys, and consistency checks. Git-backed or operator-managed
configuration on the host (projects.json) is the desired-state source of truth for
which sites exist and how they are served.
On-host layout
| Path | Purpose |
|---|---|
/etc/edox-ops/projects.json | Managed project metadata |
/var/www/docs/<slug>/ | Published documentation root |
/var/www/docs/.edox-ops-backups/<slug>/ | Pre-deploy snapshots |
/etc/nginx/sites-available/edox-ops-<slug> | Generated vhost |
/etc/nginx/sites-enabled/edox-ops-<slug> | Symlink when enabled |
Python package map
| Module | Role |
|---|---|
cli.py | Typer commands |
bootstrap.py | Host package install and nginx.prepare |
doctor.py | Host and project readiness |
project_ops.py | Project lifecycle, deploy, restore, nginx enable |
project_state.py | Atomic JSON state store |
project_consistency.py | Shared validate/doctor checks |
nginx_render.py / nginx_ops.py | Vhost template and reload |
exec.py | Subprocess wrapper (test seam) |
validators.py | Slug, domain, path safety |
See the API reference for generated module documentation.
Deploy model
Publishing uses rsync into a staging directory, then an atomic swap into root_path.
Non-empty trees are backed up before --delete sync. Failed deploys can restore from the
backup taken in the same run.
Documentation site (this repository)
The edox-ops project dogfoods a dual documentation layout:
- Docusaurus (
website/) — product guides and blog - Sphinx (
docs-api/) — Python API under/api/