Health, readiness and release acceptance
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Use only the fictional worksheet for this exercise. Before a separately authorized read-only server query, verify the effective endpoint including environment overrides, project or cluster identity, and access scope. Never deploy the fragments, use real credentials or transmit private inspection output.
Synthetic timeline:00:00 db process running; readiness fails00:20 db ready; app starts00:35 app health passes00:40 external transaction fails (wrong schema)00:45 deployment acceptance = HOLDIllustrative Compose fragment:depends_on: db: condition: service_healthy# requires a meaningful db healthcheck in the db serviceThe condition gates initial dependent startup on the defined health check. It is not a continuous availability guarantee. Choose a bounded probe whose tools exist inside the image, whose exit status represents the intended signal, and whose output contains no credentials. Distinguish a cheap liveness signal from a readiness signal that tests essential dependencies without destructive work. The release acceptance probe must also traverse the proxy and test a synthetic business operation, including schema compatibility. A healthy app with a failing transaction is a release failure, not permission to promote. If a dependency later fails, the app should handle timeouts and retry with bounded backoff; the proxy must implement its own traffic policy. Compose startup gating is not a continuous traffic gate; a later unhealthy status alone does not prove a restart occurred. Record the synthetic end-to-end failure independently of container health and hold promotion until the transaction and schema invariant pass.
Common mistake
An unhealthy container is not necessarily stopped or restarted. A restart policy responds to process termination under its rules, not merely a failed health check.
Manual practice
Write separate liveness, readiness and end-to-end acceptance criteria. For the fictional timeline decide which checks passed, which failed and why promotion must wait.
Worksheet: lab-fixtures/docker-production-deployment/06-readiness/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Health, readiness and release acceptance — Knowledge check
Interpret production deployment evidence and make a safe operational decision.
In the fictional readiness timeline, does service_healthy continuously guarantee that the database remains ready after startup?
What should happen at 00:45 in the example?
What must a probe command have?