Verifying the Stack

Verifying the Whole BookNest Stack

"Healthy" means each container passed its own check. A verification follows the path users take:

Checking every tier from the outsideShell
docker compose ps --format '{{.Service}}  {{.Status}}  {{.Ports}}' | sed 's/, \[::\].*//'
curl -sI localhost:33080/ | grep -E 'HTTP|Server'
curl -s localhost:33080/api/books/3 | cut -c1-70
curl -s localhost:33080/healthz; curl -s localhost:33000/ready; echo
Output
api  Up 8 seconds (healthy)  0.0.0.0:33000->3000/tcp
db  Up 13 seconds (healthy)  127.0.0.1:33432->5432/tcp
web  Up 3 seconds (healthy)  0.0.0.0:33080->80/tcp
HTTP/1.1 200 OK
Server: nginx/1.30.5
{"id":3,"title":"Salt and Saffron","author":"Priya Nair","genre":"Cook
ok
{"status":"ready"}

Nginx 75 served the page and proxied /api/books/3 to the API, which read it from PostgreSQL 1,289 . In a browser, http://localhost:33080/ shows the catalog, rendered by the front end's JavaScript from the API's JSON:

BookNest's catalog served by the Nginx container, with data from the API and PostgreSQL
BookNest's catalog served by the Nginx container, with data from the API and PostgreSQL

When a tier fails, work from the outside in: docker compose ps for health, logs web for 502s (Nginx cannot reach the API), logs api for database errors, and exec db psql for the data itself.