Problem solved!
the problem was not using the correct name in my flyway.conf
flyway.url=jdbc:sqlserver://localhost:1433;databaseName=${DB_NAME};TrustServerCertificate=True;
this configuration was incorrect, and instead should have been:
flyway.url=jdbc:sqlserver://database:1433;databaseName=${DB_NAME};TrustServerCertificate=True;
I needed to use database
from the docker-compose because thats what the database configuration was configured to use.