Last week you learned to keep data alive. Today you learn to ask it questions.

Week 3 ended with a database in a container and a named volume, and the point of that volume was that the data outlives the container. Today that data is the subject.

One command starts everything. If Docker is not running, start it first — the whale or the OrbStack icon in your menu bar.

You do
docker run -d --name pg \
  -e POSTGRES_PASSWORD=secret \
  -v pgdata:/var/lib/postgresql/data \
  -p 5432:5432 postgres:17

docker exec pg pg_isready -U postgres

You want accepting connections. Hands up when you see it.

1/27 exit