diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 55b88a4..2af6f36 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -161,7 +161,37 @@ And a real HTTPS hostname in: - `SITE_ADDRESS` ## Manual test deployment -If you need to deploy manually on the test server: +For a LAN-only test server, this is the recommended CD path. + +### One-command local deployment from your Mac +Use: +```bash +./scripts/deploy_test_from_mac.sh +``` + +What it does: +1. requires the current branch to be `develop` +2. fast-forwards from `origin/develop` +3. syncs the repo to `/opt/workdock` via `rsync` +4. runs the remote deployment script +5. verifies the health endpoint + +Default assumptions: +- target host: `root@192.168.2.55` +- target path: `/opt/workdock` +- env file: `.env.test` +- health URL: `http://192.168.2.55:8088/healthz/` + +Optional overrides: +```bash +DEPLOY_HOST=root@192.168.2.55 \ +DEPLOY_PATH=/opt/workdock \ +HEALTH_URL=http://192.168.2.55:8088/healthz/ \ +./scripts/deploy_test_from_mac.sh +``` + +### Manual server-side deploy only +If the latest code is already on the server: ```bash cd /opt/workdock RUN_DJANGO_CHECK=0 DEPLOY_HEALTH_URL="http://127.0.0.1:8088/healthz/" ./scripts/deploy_stack.sh .env.test docker-compose.prod.yml @@ -185,6 +215,11 @@ Behavior: - uploads the working tree to the server over SSH - runs the server deployment script +Important: +- this workflow only works if the GitHub runner can reach the server +- it is not suitable for a pure LAN-only target using a private IP like `192.168.2.55` +- for the current environment, prefer the local Mac deploy script or a self-hosted runner on the LAN + ### Production deployment workflow File: - [deploy-prod.yml](/Users/bostame/Documents/workdock-platform/.github/workflows/deploy-prod.yml) diff --git a/backend/workflows/templates/workflows/developer_handbook.html b/backend/workflows/templates/workflows/developer_handbook.html index b91aae4..1ee31f2 100644 --- a/backend/workflows/templates/workflows/developer_handbook.html +++ b/backend/workflows/templates/workflows/developer_handbook.html @@ -294,6 +294,7 @@ make backup-verify BACKUP_DIR=backups/backup_YYYYmmdd_HHMMSS
  • Current production workflow file: .github/workflows/deploy-prod.yml.
  • GitHub Actions uploads the working tree to the server over SSH. The server does not clone from GitHub.
  • This is intentional for a private repository: it removes the need to store GitHub deploy keys on the target server.
  • +
  • However, GitHub-hosted runners cannot reach a LAN-only private IP like 192.168.2.55. For the current local test server, the correct CD path is manual deployment from a LAN machine or a self-hosted runner inside the same network.
  • GitHub Environments