GitHub Canonical Developer Workflow
Purpose
This workflow defines how Earthbond should be changed from now on.
GitHub is the canonical source of truth for Earthbond source code.
The local server is the runtime target.
That means:
- code and deployment files live in GitHub,
- changes are made in a local clone,
- validated changes are pushed back to GitHub,
- the local server updates from the GitHub repository,
- runtime data remains local and is not stored in GitHub.
Canonical Repositories
Earthbond
- repository:
git@github.com:robby1312/earthbond.git
- canonical branch:
main
WIICCO Site
- repository:
git@github.com:robby1312/Wiicco-site.git
- canonical branch:
main
These are separate projects and should remain separate.
Canonical Rule
For Earthbond:
- GitHub
mainis the canonical source. - The local server should run from a clone of that repository.
- Local server edits should not live only on the server.
- Any durable change to:
- Docker
- Python
- JavaScript
- SQL
- docs
- workflows
must be committed and pushed to GitHub.
What Codex Can Do
Yes. Codex can work with GitHub as the canonical source, but the practical operating path is:
- Codex works against the local clone on disk.
- Codex edits files in that clone.
- Codex runs validation, rebuilds, and health checks locally.
- Codex commits and pushes the validated result to GitHub.
- The local server then updates from the GitHub repository.
This is the correct model.
Codex should not treat an untracked local server state as canonical.
Why Local Clone First
The app contains:
- Docker Compose
- multiple Dockerfiles
- nginx and Caddy config
- Python APIs
- workers
- generated manuals
- database migrations
Those changes often need:
- rebuilds
- health checks
- manual inspection
- git commit history
That is why the working clone is the right editing surface.
Source And Runtime Split
Stored in GitHub
- source code
- Docker config
- DB migrations
- docs and manuals
- deployment scripts
- generated schema/config manifests
Not stored in GitHub
.env- MinIO object payloads
- PostgreSQL row data
- runtime secrets
- local runtime outboxes
- uploaded field-package data
Day-To-Day Earthbond Workflow
1. Start from the canonical branch
Use:
cd "/Users/robertwilhelm/Documents/New project"
git checkout main
git pull --ff-only origin main
2. Make changes in the local clone
Allowed change surface includes:
apps/libs/db/docker/scripts/docs/contracts/docker-compose.yml
3. Validate locally
Typical validation:
cd "/Users/robertwilhelm/Documents/New project"
python3 scripts/dev/build_ui_manuals.py
./scripts/ops/check_stack_health.sh
docker compose up -d --build
Use additional checks when relevant:
make validate-docs
make validate-migrations
make test
4. Commit the change
Example:
git add -A
git commit -m "describe the change clearly"
5. Push to GitHub canonical source
git push origin main
6. Update the server from GitHub
If the local machine is the deployment host:
./scripts/ops/deploy_earthbond_from_github.sh
If GitHub Actions is active and secrets are configured:
- push to
main - GitHub Actions connects to the server
- the server fetches
origin/main - the stack rebuilds
Server Workflow
The server should be a deployment checkout, not an ad hoc development tree.
Use:
Expected server model:
- local clone tracks
origin/main - server deploy script fetches
origin/main - server resets to that state
- Docker rebuilds from that state
Docker Change Workflow
When Docker-related files change:
- edit:
docker-compose.ymldocker/*.Dockerfiledocker/nginx/*docker/caddy/*
- rebuild locally:
docker compose up -d --build
- run:
./scripts/ops/check_stack_health.sh
- commit and push to GitHub
- deploy from GitHub
main
This is important because Docker changes affect:
- reproducibility
- runtime health
- proxy behavior
- service startup order
App Change Workflow
When app code changes:
- edit Python or JavaScript files in the local clone
- regenerate manuals if docs changed
- run relevant validation
- rebuild affected services
- verify the WAN endpoints if needed
- commit and push to GitHub
main
Backup Workflow
The scheduled backup job now assumes the canonical branch is:
main
It exports:
- Docker config manifests
- PostgreSQL schema-only backup
- MinIO manifest
- repo state manifests
Then it commits and pushes the result to GitHub.
Run manually:
cd "/Users/robertwilhelm/Documents/New project"
./scripts/ops/backup_to_github.sh
Codex Working Rules
If Codex is changing Earthbond:
- work from the local Earthbond clone
- treat GitHub
mainas the durable source of truth - keep the running server healthy while editing
- rebuild and validate before push
- push the resulting source back to GitHub
- never treat secret or runtime data as git content
What Not To Do
Do not:
- keep important changes only on the server
- treat MinIO or PostgreSQL runtime data as source code
- mix WIICCO Site changes into the Earthbond repo long-term
- deploy from random local untracked edits
- use GitHub branches as long-term project boundaries for separate products
WIICCO Site Workflow
WIICCO Site should follow the same model in its own repository:
- clone
git@github.com:robby1312/Wiicco-site.git - work from
main - commit and push to
main - deploy from that repo's local clone
Decision Summary
The correct operating model is:
- GitHub is canonical for source
- Codex edits the local clone
- changes are validated locally
- changes are pushed to GitHub
- the computer/server updates from GitHub
That is the defendable workflow for a Docker-heavy application where code, infrastructure, and generated manuals all change together.