Step 10
Step 10 — Operate Compose, readiness, reverse proxy, and rollback
0 views
Step 10 — Operate Compose, readiness, reverse proxy, and rollback
A live process is not necessarily ready to serve. Check DB, Redis, Kafka, and Supabase dependencies, and connect only ready services to the public entry point.
- Keep public ports at Caddy 80/443; keep API, Actuator, and Prometheus internal.
- Use
depends_on: service_healthyfor required dependencies, while documenting boundaries such as Kafka consumers that retry after process start. - Start Prometheus only in the optional
observabilityprofile and bind it to loopback. - Mount the Admin-writable Codingstairs upload directory read-only in the public app, using the same host path.
If Caddy forwards /actuator/prometheus publicly, internal state is exposed. Internal scraping and public routes need separate contracts. Replace and restore only target services rather than taking down the whole Compose stack.
Codingstairs' Docker SSR and Fly static mirror follow the same rule. A shared type checks the CMS function surface, while the explicit Fly image build profile fails if a DB import or dynamic route remains. After a DB seed, rebuild the Fly snapshot so both users see the same courses and notes.
Separate required readiness from optional capabilities as well. /health/ready treats only the database and embedding gates needed for search as required, while /health/capabilities reports service databases, text/vision models, push, and the scheduler independently. An optional outage becomes degraded instead of making unrelated requests not-ready.