title: How to specify Memory & CPU limit in docker compose version 3
body: <p>I am unable to specify CPU and memory limitation for services specified in version 3.</p>
  <p>With version 2 it works fine with <code>mem_limit</code> &amp; <code>cpu_shares</code> parameters under the services. But it fails while using version 3, putting them under <code>deploy</code> section doesn't seem worthy unless I am using swarm mode.</p>
  <p>Can somebody help?</p>
  <pre class="lang-yaml prettyprint-override"><code>    version: &quot;3&quot;
      services:
        node:
          build:
           context: .
            dockerfile: ./docker-build/Dockerfile.node
          restart: always
          environment:
            - VIRTUAL_HOST=localhost
          volumes:
            - logs:/app/out/
          expose:
            - 8083
          command: [&quot;npm&quot;,&quot;start&quot;]
          cap_drop:
            - NET_ADMIN
            - SYS_ADMIN
  </code></pre>