Files
aza/AzA march 2026/deploy/DEPLOY_CHECKLIST.md
2026-03-25 22:03:39 +01:00

43 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AZA Deployment Checklist (Step 16)
## 1. Environment variables
- `MEDWORK_API_TOKEN` required for API auth (or use `backend_token.txt` in repo root)
- Stripe placeholders: `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET` (set when Stripe is configured)
- Secrets policy: never commit tokens; use env or secret store; `backend_token.txt` in `.gitignore`
## 2. Backend startup
- `python backend_main.py` (from project root)
- Required dependencies: install via `pip install -r requirements.txt` or project-specific install
## 3. Caddy reverse proxy
Example Caddyfile (see `deploy/Caddyfile`):
```
{$DOMAIN} {
encode gzip zstd
reverse_proxy backend:8000
}
:8080 {
encode gzip zstd
reverse_proxy localhost:8000
}
```
- Domain placeholder: set `DOMAIN=example.com` when DNS points to this machine
## 4. Health verification
```bash
curl -H "X-API-Token: AZA_LOCAL_TOKEN_123456" http://localhost:8080/license/status
curl http://localhost:8080/health
```
## 5. Restart procedure
1. Restart backend (stop process, then `python backend_main.py`)
2. Restart Caddy (stop process, then `caddy run --config deploy/Caddyfile`)