In ~/signup, Postgres is already running from compose.yaml. The Flask app is not in the file yet. Look at what is there:
sh
ls -a
cat compose.yaml web.env
docker compose psOpen the file and add a web service under services:, at the same indent as db::
| Field | Value |
|---|---|
| build | the Dockerfile in this directory |
| ports | host 8000 → container 5000 |
| environment | DB_PASSWORD: workshop-pass |
| env_file | web.env |
Save, then apply the file. Compose builds the image, then starts web; db keeps running.
sh
docker compose up -d
docker compose ps
curl -s localhost:8000If web is not listed, read why it exited:
Confirm which variables reached the container and which image Compose built:
sh
docker compose exec web env
docker compose images