I\'m pretty new to Docker and I need to startup my Angular/SpringBoot/MySQL project with docker-compose on the docker toolbox. I copied a docker yml file into my project whi
you need to change your connecion like this:
jdbc:mysql://database:3306/db_example
and add this to your docker-compose under springapi
service:
links:
- database
on the other hand you may use wait-for-it.sh to check if DB is up by add a command section under springapi
service:
command: ["path/to/wait-for-it.sh", "database:3306", "-t", "6000", "--", "YOUR ACTUAL COMMAND"]