Skip to content

feat(config): enable Docker Compose auto-start in HTTP mode only#70

Open
adityamparikh wants to merge 1 commit intoapache:mainfrom
adityamparikh:feat/docker-compose-http-only
Open

feat(config): enable Docker Compose auto-start in HTTP mode only#70
adityamparikh wants to merge 1 commit intoapache:mainfrom
adityamparikh:feat/docker-compose-http-only

Conversation

@adityamparikh
Copy link
Contributor

Summary

  • Adds spring.docker.compose.enabled=true to application-http.properties so running PROFILES=http ./gradlew bootRun automatically starts Solr, ZooKeeper, and other services declared in compose.yaml before the application context initialises.
  • Adds spring.docker.compose.enabled=false to application-stdio.properties to disable Docker Compose in STDIO mode, where it is not useful and would pollute stdout.
  • Expands the comment in build.gradle.kts (Jib container config) to explain why SPRING_DOCKER_COMPOSE_ENABLED=false is baked into the container image (Docker Compose cannot start sibling containers without a Docker socket mount).
  • Updates dev-docs/DEVELOPMENT.md, dev-docs/TROUBLESHOOTING.md, and docs/AUTH0_SETUP.md to consistently use the PROFILES environment variable (PROFILES=http ./gradlew bootRun) instead of the --spring.profiles.active argument flag.

Test plan

  • Run PROFILES=http ./gradlew bootRun and verify Solr starts automatically via Docker Compose without any manual docker compose up step.
  • Run ./gradlew bootRun (STDIO mode) and verify Docker Compose is not invoked (no container startup output).
  • Verify ./gradlew build passes with no test regressions.

🤖 Generated with Claude Code

Spring Boot Docker Compose integration now starts automatically when running
locally with the HTTP profile (PROFILES=http ./gradlew bootRun). In STDIO
mode, Docker Compose is explicitly disabled because STDIO requires a clean
stdout channel and container management is not useful for that transport.

The Jib container image already disables Docker Compose via
SPRING_DOCKER_COMPOSE_ENABLED=false; an expanded comment explains why.

Also updates all documentation to prefer the PROFILES environment variable
over the --spring.profiles.active flag for consistency with the runtime
configuration approach used by Docker and the JAR launcher.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant