Learning paths / Containers / Docker Compose

Check: Compose

Knowledge check · 5 min · Module 6, lesson 5 of 55 min left in this module

Module 6 · Docker ComposeLesson 5 of 5

Goal: Confirm you can read a Compose file, run and tear down a stack, and decide what goes to ComputeSphere.

Four questions: three on this module, one from Module 4. Every answer explains itself, right or wrong.

In compose.yaml, web connects to postgres://app:demo-password@db:5432/app. You rename the db service to database. What else must change?
You want to stop the stack for the night and keep the database's rows. Which command?
csph import compose warns: PostgreSQL imported as a plain container. What's the right fix on ComputeSphere?
From Module 4: docker compose up --build builds web from ./app, and the image turns out to contain your .env file and your laptop's node_modules. What fixes it?

Retry as often as you like.