Skip to content

Commit

Permalink
set cpuset for services / mem_limit for worker
Browse files Browse the repository at this point in the history
  • Loading branch information
HadronCollider committed Mar 21, 2024
1 parent 157a364 commit f4a0241
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
- presentation_files:/usr/src/project/files/
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
cpuset: ${CONTAINER_CPU:-0-1}

worker:
image: slides_checker_base_image
Expand All @@ -36,6 +37,8 @@ services:
- presentation_files:/usr/src/project/files/
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
cpuset: ${CONTAINER_CPU:-0-1}
mem_limit: ${WORKER_MEMORY:-1G}

worker-dashboard:
image: slides_checker_base_image
Expand All @@ -53,12 +56,14 @@ services:
depends_on:
- worker
- redis
cpuset: ${CONTAINER_CPU:-0-1}

redis:
image: redis:6-alpine
restart: always
volumes:
- redis_data:/data
cpuset: ${CONTAINER_CPU:-0-1}

mongodb:
image: mongo:4.0.17-xenial
Expand All @@ -67,6 +72,7 @@ services:
- '--wiredTigerCacheSizeGB=${MONGODB_CACHE_SIZE:-1}'
volumes:
- ../slides_checker_mongo_data:/data/db
cpuset: ${CONTAINER_CPU:-0-1}

volumes:
presentation_files:
Expand Down

0 comments on commit f4a0241

Please sign in to comment.