Spring Boot Docker Compose on Multi-Module project
06:48 09 Mar 2026

I have a monorepo with 7 subprojects(modules), where 6 of these are a Spring Boot application.
I am also using Spring Boot Docker Compose dependency


    common
    app1
    app2
    app3
    app4
    app5
    app6



    org.springframework.boot
    spring-boot-docker-compose
    runtime
    true

The docker-compose.yml is placed on root, because some of the apps share common services like RabbitMQ.

Main pom.xml

  docker:
    compose:
      enabled: false
      file: ../docker-compose.yml
      profiles:
        active: "rabbitmq,app1"

Each module pom.xml for the application-local.yml

  docker:
    compose:
      enabled: true

Some Applications have their own database, so app1 profile will set up the database for app1 in the common docker-compose.yml.

I can run each Spring Boot application like this

./mvnw -pl app1 -am spring-boot:run

However If I want to run all applications at once

./mvnw spring-boot:run

This will only run app1, then when I stop it will start app2, and so on.

Is there a way to run each Spring Boot application with Maven in parallel instead of sequential?

spring-boot maven docker-compose