EduFlow
Docker & Kubernetes: Ship with Confidence

Checkpoint: Local Environments with Docker Compose

Five questions on this section. Answer all of them, then see your score and why each answer is right or wrong.

Question 1 of 5

In Compose, the api service’s DATABASE_URL is postgres://notes:notes@db:5432/notes. You rename the service from db to postgres and run docker compose up -d --remove-orphans. What happens?

Question 2 of 5

You run docker compose down, edit db/init/002-seed.sql, and run docker compose up -d. The seed data doesn’t appear. Why?

Question 3 of 5

A migrate service runs schema migrations and exits. You want api to start only after Postgres is healthy and the migration succeeded. Which depends_on for api is right?

Question 4 of 5

Your project .env contains POSTGRES_PASSWORD=devpass. compose.yaml sets POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} under db.environment. You run POSTGRES_PASSWORD=other docker compose up -d on a fresh volume. Which password does Postgres get?

Question 5 of 5

Your teammate’s dev setup bind-mounts the whole project (.:/app) into the API container on macOS. The app fails with a native module error and file changes feel slow. What do you recommend?

5 questions unanswered