Depending on how your service is actualy named in the compose file, it is almost or completly correct.
- if your service is named “dabase” then its correct.
- if your service is named “database”, then your environment must be
spring.datasource.url=jdbc:postgresql://database:5432/reactdb
(of course ifreactdb
is also correct)