diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md
index 3c36495..c9ef327 100644
--- a/DEPLOYMENT.md
+++ b/DEPLOYMENT.md
@@ -7,6 +7,24 @@
- GitHub Actions uploads the repository contents to the server over SSH
- the server does not need GitHub access to deploy
+## Standard target model for later
+When this moves from an internal test setup to a more standard delivery model, the target should be:
+1. feature branch
+2. CI
+3. merge into `develop`
+4. staging deploy
+5. staging validation
+6. merge into `main`
+7. production deploy
+
+Recommended standards for that future state:
+- staging and production use separate hosts or clearly separated environments
+- staging and production use separate secrets
+- production deploys only from `main`
+- production runs with HTTPS and `DJANGO_DEBUG=0`
+- production deploys require environment protection or approval in GitHub
+- rollback is documented and tested
+
This is intentional. For a private repository, server-side `git clone` adds unnecessary credential management.
## Branch strategy
diff --git a/backend/workflows/templates/workflows/developer_handbook.html b/backend/workflows/templates/workflows/developer_handbook.html
index 87cf19e..c59248c 100644
--- a/backend/workflows/templates/workflows/developer_handbook.html
+++ b/backend/workflows/templates/workflows/developer_handbook.html
@@ -366,6 +366,16 @@ make backup-verify BACKUP_DIR=backups/backup_YYYYmmdd_HHMMSS
+
+
What is good enough today vs what is standard later
+
+ - Today: GitHub runs CI, then a LAN-connected Mac deploys to the private test server with the helper scripts.
+ - Standard later: GitHub runs CI, then an approved deploy job promotes tested code to staging and production automatically.
+ - Why they differ: the current test server is inside the LAN, so GitHub-hosted runners cannot reach it directly.
+ - When to upgrade: do it once staging or production lives on a public host, or once you add a self-hosted runner inside the LAN.
+
+
+
Why deploy is manual right now
The test server is inside the local network and uses a private IP address 192.168.2.55. GitHub-hosted runners on the public internet cannot reliably reach that target. Because of that, the correct deployment path today is:
@@ -377,6 +387,34 @@ make backup-verify BACKUP_DIR=backups/backup_YYYYmmdd_HHMMSS
Automatic CD from GitHub becomes appropriate only after moving to a public server or using a self-hosted runner inside the LAN.
+
+
Recommended standard CI/CD model
+
+ - Keep one private repository.
+ - Use short-lived feature branches from
develop.
+ - Require CI to pass before merge into
develop.
+ - Deploy
develop to a staging environment.
+ - Promote
develop into main only after staging validation.
+ - Deploy
main to production behind HTTPS with DEBUG=0.
+ - Protect production with GitHub environment approvals, production secrets, and rollback steps.
+
+
If you want the most standard shape, the long-term target is:
+
feature branch -> CI -> develop -> staging deploy -> validate -> main -> production deploy
+
+
+
+
What to change when this becomes a standard deployment
+
+ - Move staging and production onto hosts that GitHub or a self-hosted runner can reach reliably.
+ - Keep separate env files and secrets for staging and production.
+ - Run production with
DJANGO_DEBUG=0, secure cookies, and HTTPS only.
+ - Add GitHub environment protection rules for
development and production.
+ - Use the production deploy path only from
main.
+ - Add backup verification and health verification as standard post-deploy checks.
+ - Later, consider image-based deploys if you want cleaner rollbacks than source-upload deploys.
+
+
+
What to do for normal work
@@ -391,6 +429,15 @@ make backup-verify BACKUP_DIR=backups/backup_YYYYmmdd_HHMMSS
+
+
Decision guide
+
+ - Keep the current manual Mac deploy flow if the server stays private inside the LAN.
+ - Use a self-hosted GitHub runner if you want automated deploys but the server must stay private.
+ - Use GitHub-hosted deploy jobs once staging or production runs on a publicly reachable host or VPN-reachable target.
+
+
+
One-command test deployment
From the Mac on the same network:
@@ -448,6 +495,17 @@ make backup-verify BACKUP_DIR=backups/backup_YYYYmmdd_HHMMSS
+
+
Minimal standard checklist for later
+
+ - Staging and production must not share secrets.
+ - Production deploy must run from
main only.
+ - Production must have HTTPS, health checks, backups, and a documented rollback path.
+ - Runtime config sync must stay explicit. Code deploys should not silently overwrite DB-backed config.
+ - Every deploy path should end with a health check and a quick browser verification of critical flows.
+
+
+
If the local deploy helper fails