version: '3' services: mysql: image: mysql:8.0
app: build: . command: is_ready --timeout 10 --addr mysql:3306 -- <run migrations command>
version: '3' services: mysql: image: mysql:8.0
For cases like this, returning 503 every time the database is not ready, is not very convenient.