You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use docker-compose in my tests with
spring.docker.compose.skip.in-tests=false
Also I want to use docker-compose when I start my Spring Boot Application inside my Intellij IDE. When you have a multi module project the search for docker-compose.yml fails.
If you have a module "backend" in your "app" project like this:
When I run my test it searches for docker-compose.yml in /app/backend/ and finds the file. When I run BootApplication.java it searches in app/ and fails. At least thats the case in IntelliJ. The working directory might differ somewhere else.
Two workarounds:
As I have two profiles (dev and integration), I can set the docker-compose file in application-dev.properties to
Thanks for the suggestion, but we don't think searching down the tree for docker compose files is something we should do. It's likely to be a costly operation and it's possible that we might find multiple docker-compose.yml files.
There are a number of aspects in Spring Boot that rely on having a correctly set working directory. For example, finding external application.properties files or writing out a pid file. I think it might be worth raising this issue with Jetbrains to see if they can consider changing their configuration defaults for Spring Boot applications?
I would like to use docker-compose in my tests with
Also I want to use docker-compose when I start my Spring Boot Application inside my Intellij IDE. When you have a multi module project the search for docker-compose.yml fails.
If you have a module "backend" in your "app" project like this:
When I run my test it searches for docker-compose.yml in
/app/backend/
and finds the file. When I run BootApplication.java it searches inapp/
and fails. At least thats the case in IntelliJ. The working directory might differ somewhere else.Two workarounds:
As I have two profiles (dev and integration), I can set the docker-compose file in application-dev.properties to
spring.docker.compose.file=backend/docker-compose.yml
Or I can set the working directory in my IntelliJ Run configuration
Maybe SpringBootApplication should search in its own project (app/backend) and not only in the current working directory.
The text was updated successfully, but these errors were encountered: