Compose: Unable to set mem_limit with docker-compose version 3.x in a non swarm run

Created on 19 Mar 2018  路  1Comment  路  Source: docker/compose

Hello,

I'm trying to limit memory usage of a service. According to the documentation the 'deploy' key is only taken in consideration when in swarm mode. An alternative is presented:

Looking for options to set resources on non swarm mode containers?

The options described here are specific to the deploy key and swarm mode. If you want to set ?>resource constraints on non swarm deployments, use Compose file format version 2 CPU, memory, >and other resource options. If you have further questions, refer to the discussion on the GitHub issue >docker/compose/4513.

So I switched to using mem_limit. But when running the compose I get an error:

Unsupported config option for services.documentmetadatastore: 'mem_limit'

My configuration:

documentmetadatastore: mem_limit: 50M container_name: documentmetadatastore image: "dockerhub.hailforge.com/redis:alpine" command: ["redis-server", "--appendonly", "yes"] ports: - "6379:6379" volumes: - /data/documentstore/redis:/data

>All comments

Duplicate of #4513

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CrimsonGlory picture CrimsonGlory  路  3Comments

saulshanabrook picture saulshanabrook  路  3Comments

dazorni picture dazorni  路  3Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  3Comments

squeaky-pl picture squeaky-pl  路  3Comments