Tech
Compose has init containers now. Here's what I deleted.
Every Compose file I have written for a real app has the same two services in it that aren't really services. One runs the migrations. One seeds the database. They exist because something has to run before the app and Compose had no way to say that, so you fake it with depends_on and a condition and hope nobody runs docker compose ps -a .
Compose 5.3 shipped pre_start in July. It is the thing I have been faking for years, so I spent an evening on it with a Postgres 18 container and a sma...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to