title: Docker - memory issue - how to set it to higher value?
body: <p>Where exactly and how to put in docker-compose.yml file the maximum limit of memory that a docker will use?</p>
  
  <pre><code>version: "3"
  services:
    mysql:
      image: "mysql:latest"
      ports:
        - "3306:3306"
      environment:
        MYSQL_ROOT_PASSWORD: test
    backend:
      image: "backend:latest"
      ports:
        - 19001:19001
        - 80:80
        - "9001:9000"
      environment:
        DB_USERNAME: test
        DB_PASSWORD: test
        DB_URL: jdbc:mysql://mysql:3306/test
        jdbc_url: jdbc:mysql://mysql:3306
        JAVA_HOME: "/application/jdk8"
      links:
        - "mysql:mysql"
  </code></pre>
  
  <p>Currently I am running a backend app and it is running out of memory (crashing with memory exception) - this is usage just before the crash:</p>
  
  <pre><code>CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
  71f94ad4b16c        docker_backend_1    187.58%             1.113GiB / 1.952GiB   57.01%              92.4MB / 61.2MB     147MB / 180MB       73
  dc2ec6cca410        docker_web_1        0.38%               95.71MiB / 1.952GiB   4.79%               2.05kB / 0B         59.6MB / 41kB       21
  0960ca70127a        docker_mysql_1      0.04%               277.3MiB / 1.952GiB   13.87%              60.2MB / 64.3MB     62.8MB / 3.58GB     51
  </code></pre>