How to specify Memory & CPU limit in docker compose version 3 : <p>I am unable to specify CPU &amp; memory for services specified in version 3 .</p>

<p>With version 2 it works fine with "mem_limit" &amp; "cpu_shares" parameters under the services . But it fails while using version 3 , putting them under deploy section doesn't seem worthy unless i am using swarm mode .</p>

<p>Can somebody help ?</p>

<pre><code>version: "3"
services:
  node:
    build:
     context: .
      dockerfile: ./docker-build/Dockerfile.node
    restart: always
    environment:
      - VIRTUAL_HOST=localhost
    volumes:
      - logs:/app/out/
    expose:
      - 8083
    command: ["npm","start"]
    cap_drop:
      - NET_ADMIN
      - SYS_ADMIN
</code></pre>
