Fix healthcheck + verify commands; reframe deploy runbook for a capable agent
Real bug: the container healthcheck (and the docs' verify step) hit /api/capabilities, which returns 403 unauthenticated; curl --fail treats 403 as an error, so a healthy container would report "unhealthy" and the verify step would look like a failure. Healthcheck now hits /accounts/login/ (200, no auth). Verify commands now print the status code and note not to use curl -f on the 403. Also reframed cloud_agent_deploy.md's intro for an Opus-class deploy agent: it's a guide + Daybook-specific gotchas, not a rigid script — points at the authoritative sources (repo incl. the git-SSH :2222 note, deploy/ files, requirements.txt deps auto-installed, entrypoint runs migrate+collectstatic, docs/deployment.md) and trusts the agent's judgment. Dropped the now- redundant Source Of Truth section. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a355285f3b
commit
ca8e364010
3 changed files with 41 additions and 24 deletions
|
|
@ -86,11 +86,13 @@ docker compose -f deploy/docker-compose.yml exec daybook python manage.py create
|
|||
|
||||
```bash
|
||||
docker compose -f deploy/docker-compose.yml ps
|
||||
curl -fsS http://127.0.0.1:8000/api/capabilities
|
||||
curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8000/api/capabilities # expect 403
|
||||
```
|
||||
|
||||
An unauthenticated capabilities check returns 403 (login/token required) —
|
||||
that's expected; it confirms the app is up and enforcing auth. Open
|
||||
that's expected; it confirms the app is up and enforcing auth. (Don't add
|
||||
`curl -f` — it treats the 403 as an error. The container healthcheck uses
|
||||
the login page, which is 200 without auth.) Open
|
||||
`http://<vm-ip>:8000/` in a browser and log in with the superuser you just
|
||||
created, then grab a personal token from Settings → Account and use it for a
|
||||
smoke-test post:
|
||||
|
|
@ -187,8 +189,8 @@ Caddy: header_up X-Forwarded-Proto https
|
|||
proxy forwards `X-Forwarded-Proto: https` (login will 403 otherwise).
|
||||
- `deploy/data/` exists and persists across `git pull` + rebuild.
|
||||
- `docker compose -f deploy/docker-compose.yml ps` shows `daybook` healthy.
|
||||
- `curl -fsS http://127.0.0.1:8000/api/capabilities` returns 403 without auth,
|
||||
200 with a valid token or session.
|
||||
- `GET /api/capabilities` returns 403 without auth, 200 with a valid token or
|
||||
session (check the status code — don't use `curl -f`, which errors on 403).
|
||||
- At least one superuser exists (`manage.py createsuperuser`) with a token
|
||||
from Settings → Account.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue