Docker Compose gives us the flexibility to scale our application with a single command with docker-compose:
> docker-compose up --scale <app-name>=<number of instance>
We can scale the instances using the following command:
> docker-compose up --scale invoice-app=2
The preceding command will spin up another invoice instance. We can view this on the JHipster Registry dashboard, as follows:
And that's it – we have successfully deployed and scaled our microservice application using Docker Compose.