Merge pull request #181 from 1Password/dv/set-docker-resource-requests-and-limits

Set Docker resource requests and limits
This commit is contained in:
De Ville Weppenaar
2022-04-12 09:13:33 -07:00
committed by GitHub
4 changed files with 10 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ services:
image: redis:latest
networks:
- op-scim
env_file: redis.env
restart: always
networks:

4
docker/compose/redis.env Normal file
View File

@@ -0,0 +1,4 @@
# Set the arguments passed to Redis:
# - maxmemory configures Redis to use a specified amount of memory for the data set
# - maxmemory-policy is the eviction policy used when the maximum memory is reached
REDIS_ARGS="--maxmemory 256mb --maxmemory-policy volatile-lru"

View File

@@ -28,6 +28,7 @@ services:
condition: any
networks:
- op-scim
env_file: redis.env
networks:
op-scim:

4
docker/swarm/redis.env Normal file
View File

@@ -0,0 +1,4 @@
# Set the arguments passed to Redis:
# - maxmemory configures Redis to use a specified amount of memory for the data set
# - maxmemory-policy is the eviction policy used when the maximum memory is reached
REDIS_ARGS="--maxmemory 256mb --maxmemory-policy volatile-lru"