Skip to content

Add property to specify Docker Compose startup and shutdown flags #38763

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

Closed
mhalbritter opened this issue Dec 13, 2023 · 5 comments
Closed

Add property to specify Docker Compose startup and shutdown flags #38763

mhalbritter opened this issue Dec 13, 2023 · 5 comments
Assignees
Labels
theme: containers Testcontainers, Docker Compose and Buildpack features type: enhancement A general enhancement
Milestone

Comments

@mhalbritter
Copy link
Contributor

mhalbritter commented Dec 13, 2023

@dsyer ran into an issue where a Postgres update prevented the start of the Postgres container used for integration tests. Adding a --force-recreate --renew-anon-volumes would fix that, but as of now, there's no possibility to add additional flags to the docker compose up call.

@habuma
Copy link
Member

habuma commented May 5, 2024

Similarly, there's no way (at least not that I see) to specify options for Docker Compose "down". For example, when I have a Docker Compose file that stands up a Chroma database in Docker, it also creates a volume. But when the app stops, only the container goes away, not the volume. docker compose down --volumes takes the volume down at the command line, but it would be useful to be able to have it remove the volume when the app stops.

@wilkinsona wilkinsona added the status: pending-design-work Needs design work before any code can be developed label May 7, 2024
@scottfrederick scottfrederick changed the title Add property to specify Docker Compose startup flags Add property to specify Docker Compose startup and shutdown flags May 23, 2024
@wilkinsona
Copy link
Member

wilkinsona commented Jun 12, 2024

#41086 is requesting the ability to set -p/--project-name. The project name can be set in the Docker Compose yaml file, but this flag allows that configuration to be overridden.

@osopromadze
Copy link

Hi @wilkinsona, can I work on this issue?

@wilkinsona
Copy link
Member

Thanks for the offer, @osopromadze, but we're not ready to start work on this one, hence the status: pending-design-work label.

@philwebb philwebb added the theme: containers Testcontainers, Docker Compose and Buildpack features label Jun 17, 2024
@philwebb philwebb modified the milestones: 3.x, 3.4.x Jun 17, 2024
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Jun 18, 2024
These new properties take a List<String>:

- spring.docker.compose.start.arguments
- spring.docker.compose.stop.arguments

Closes spring-projectsgh-38763
@mhalbritter
Copy link
Contributor Author

Changes are here and ready to be merged as soon as we have the 3.3.x branch: https://github.com/mhalbritter/spring-boot/tree/mh/38763-add-property-to-specify-docker-compose-startup-and-shutdown-flags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: containers Testcontainers, Docker Compose and Buildpack features type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants