~/signup has the app, its Dockerfile and a .env file, but no compose.yaml. Write one that meets the brief:
Each objective lists one requirement. Use the hints if you get stuck.
Lab5 objectives100 XP
~/signup has the app, its Dockerfile and a .env file, but no compose.yaml. Write one that meets the brief:
Each objective lists one requirement. Use the hints if you get stuck.
Run web (built here, port 8000) and db (postgres:16)
Run web (built here, port 8000) and db (postgres:16)
Take the password from .env
Both containers get the value from .env through ${POSTGRES_PASSWORD}. The password itself is not in compose.yaml.
Keep Postgres data in the named volume db-data
Start web only after db is healthy
Prove a signup survives docker compose down and up
Add a signup, run docker compose down, then docker compose up -d. The count is still above zero.