-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Description
To reduce startup/shutdown time for local development I'm currently using the start-only
option for Docker Compose:
spring.docker.compose.lifecycle-management: start-only
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:
- In the
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
) - Add a new option like
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.
b-heimann-senacor, Ev3rdown, and1x0 and mroche89
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement