-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add property to ignore running Docker Compose services #39749
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Something like this was mentioned in a comment on another issue. I don't think we could change the behavior of the We could consider a new mode like |
How about we add a property named
would start additional services.
would start additional services and restart existing services if their configuration changes. I sketched that in https://github.com/mhalbritter/spring-boot/tree/mh/39749-restart-changed-services-in-docker-compose-when-using-start-only-lifecycle. |
start-only
lifecycle
We talked about that, and we're going to add a new property |
To reduce startup/shutdown time for local development I'm currently using the
start-only
option for Docker Compose:However, I noticed that if I change the existing services in the associated Docker Compose file (change port, volume, env vars, etc.), then these changes are not picked up automatically on the next Spring Boot application startup and I need to manually stop/restart the Compose services to take effect. Of course this is not a very common scenario but I think it's something which could be supported.
I see two possible options to handle this:
start-only
mode instead of just checking if services are already running, always run adocker compose up
ordocker compose start
which will not do anything if the services are already running but will recreate them if there were changes (when the start command is configured toup
)restart-on-change
which under the hood could just calldocker compose up
which already does this logic: if no changes, use already running service, if there are changes, recreate them. Although, there is a possible conflict here if someone configures the start command to bestart
instead ofup
but maybe that can be documented.The text was updated successfully, but these errors were encountered: