Docker Compose support lets a Spring Boot application start containers defined in compose.yaml when the application starts and stop them when it shuts down. It removes the need to manage a database or service separately during local development. section 4.2 section 7.3.2
Typical setup combines:
- The spring-boot-docker-compose dependency, which starts containers from compose.yaml. section 4.2
- A service-connection dependency, which configures supported clients such as Spring AI to connect to the containerized service. section 4.2
- A compose.yaml file describing the required service, image, environment, and ports. section 4.2 section 7.3.2
Qdrant and PostgreSQL
A document application can declare Qdrant on ports 6334 and 6333 for vector storage and debugging. An MCP server can instead declare PostgreSQL, initialize its schema and data, and configure spring.sql.init.mode=always because the Docker database is not embedded. section 4.2 section 7.3.2
services:
qdrant:
image: 'qdrant/qdrant:latest'
ports:
- '6334:6334'
- '6333:6333'
Shows the minimal Qdrant service declaration, including its image and port mappings. section 4.2
