Graceful Shutdown in Compose
Labs have no container engine, so nothing is started: your files are checked with docker-compose config.
Every deploy of promo-api:
proxy (nginx) drops in-flight requests: nginx treats SIGTERM as "stop now"; its graceful shutdown signal is SIGQUIT.worker jobs run for up to 90 seconds, but Docker kills the container 10 seconds after asking it to stop.worker also starts helper processes and, as PID 1, never reaps them: ps shows dozens of zombies.In /home/student/projects/promo-api/compose.yaml:
proxy is stopped with SIGQUIT and gets 30 seconds to finish,worker gets 2 minutes to finish and runs with an init process as PID 1,About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Part of Docker Fundamentals. Next step: Run Database Migrations Once, Before the App
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.