After writing up Compose healthchecks for Postgres, I kept rewriting the same block for other databases, so I made a small single-page generator. You pick the service, optionally a password variable and your app's service name, and it outputs the healthcheck: plus depends_on: condition: service_healthy, with $$ escaping so Compose doesn't eat your variables. It also adds the password env lines that Postgres and MySQL need to start.
Grab the generator (free): https://8686702537545.gumroad.com/l/cumhuh?ref=devto-gen-cta
Enter $0 at checkout. Gumroad asks for an email so it can send you the file. It's one HTML page that runs offline.
Want the whole stack instead of one block? The Docker & Dev Container Starter Pack: commented multi-stage Dockerfiles for Node, Python, Go and static sites, three Compose stacks, and three dev container configs, plus a Makefile. It's $15, or $9 with code SHIPKIT9 until tonight, Thu Oct 15 at 11:59 PM CT.
Which database should I add next? Tell me in the comments.
I make ShipKit, which sells this pack.
Top comments (0)