The php command
php artisan migrate
succeeds provided I do 2 things:
rename the service mysql instead of db (in .env file and docker-compose.yml)
add the --network <id> flag when connecting to the backend container's shell