Situation
The shop orders service, the backend application with nginx in front of it as proxy, used to
be started by hand with docker run commands. The orders have been kept in a Docker volume ever
since. A colleague described the service in ~/shop/compose.yaml (with proxy.conf, the nginx
configuration, next to it), removed the old containers and ran sudo docker compose up -d in
~/shop. The stack did not come up, and the colleague's shift is over.
The service must answer on port 8080 of this machine. Run docker commands with sudo: the student
user has no direct access to Docker. The files in ~/shop are yours, you can edit them without
sudo. The machine has no internet access; the nginx:alpine and shop-backend:1.0 images are
already here.
Task
- The stack from
~/shop/compose.yamlis up viadocker compose:proxyis running,backendpasses its health check (healthy), and neither of them keeps restarting. curl http://localhost:8080/gets code 200 and the order list fromproxy.backendshows the orders from the volume that held them before the move to compose, and the existing orders are intact.
Lab goals
0 of 3-
The stack from ~/shop/compose.yaml is up via docker compose — proxy is running, backend is healthy, neither keeps restarting — not checked yet
-
curl http://localhost:8080/ gets code 200 and the order list from proxy — not checked yet
-
backend shows the orders from the volume that held them before compose, and the existing orders are intact — not checked yet
Hints
0 of 3 open · they open one at a time
Hint 1
Show the solution
after 3 failed checks