Closed alfabravo2013 closed 9 months ago
The docker compose path issue will be solved with the gradle Bootrun addition IMO. So I will not add a path property, but checkin a Run Configuration to start the App, that Devs can also tranfer into Service Tool window & add Readme for it
container lifecycle: I see no reason to have the MongoDb container run after the app shuts down. Starting up the container takes maybe 1 second (once it is among the Images) and we persist into a volume. So an unnecessary running container would annoy me mostly. Only pro for having it run I see, is that the Database Tool Window would work in IntelliJ when Developing - but in fact that is the usecase for the TestApplication from(...).with(...) tht spring.io sets up. => I would leave the Lifecycle as is
mongoDb volume: Agreed - though you can easily remove it with Docker Desktop (that's what I do). But there is no harm in providing a shell script - or option in compose.yml. @alfabravo2013: Do you have a preferred solution here?
Thanks for explanations! I agree with container lifecycle and the test application config, it makes sense. I'd be nice to mention it in the README. An instruction in README how to remove container data altogether would be enough.
@wisskirchenj this entire issue actually can be solved by adding a few lines in README.md.
All necessary changes applied.
Spring Boot docker compose settings should be fine-tuned and better documented. Matters to concider and make a decision:
README.md
should provide an instruction how to remove the volume from the local machine if needed.server/
while thecompose.yaml
is in the parent directory. This causes inconvenience when running gradle tasks from the command line. The file location should be set in theapplication.properties
.