Skip to content

Add CPU and Memory limits to the docker-compose template #2

@OpenPj

Description

@OpenPj

It seems possible to add memory limitations for each container using Docker Compose V3.
The new element to add is deploy/resources and then we should add JVM memory limitations using percentages.
So we need to add them accordingly in order to consider something pretty close to a production environment.

The new element to add is deploy/resources such as the following:

deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 1024M

For any Java container we could also declare something like the following:
-XX:MinRAMPercentage=75 -XX:MaxRAMPercentage=75

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions