feat: add local test deployment helper
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user