feat: change maxmemory from env during deploy
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
c8728df6e8
commit
2eaa22ae1b
2 changed files with 2 additions and 7 deletions
|
@ -6,7 +6,7 @@ pipeline:
|
||||||
username: sutty
|
username: sutty
|
||||||
repo: registry.nulo.in/sutty/redis
|
repo: registry.nulo.in/sutty/redis
|
||||||
tags:
|
tags:
|
||||||
- ${ALPINE_VERSION}-${MAX_MEMORY}
|
- ${ALPINE_VERSION}
|
||||||
- latest
|
- latest
|
||||||
build_args:
|
build_args:
|
||||||
- MAX_MEMORY=${MAX_MEMORY}
|
- MAX_MEMORY=${MAX_MEMORY}
|
||||||
|
@ -23,12 +23,6 @@ matrix:
|
||||||
- MAX_MEMORY: "500mb"
|
- MAX_MEMORY: "500mb"
|
||||||
ALPINE_VERSION: "3.17.0"
|
ALPINE_VERSION: "3.17.0"
|
||||||
REDIS_VERSION: "7.0.5"
|
REDIS_VERSION: "7.0.5"
|
||||||
- MAX_MEMORY: "100mb"
|
|
||||||
ALPINE_VERSION: "3.17.0"
|
|
||||||
REDIS_VERSION: "7.0.5"
|
|
||||||
- MAX_MEMORY: "500mb"
|
- MAX_MEMORY: "500mb"
|
||||||
ALPINE_VERSION: "3.16.3"
|
ALPINE_VERSION: "3.16.3"
|
||||||
REDIS_VERSION: "7.0.4"
|
REDIS_VERSION: "7.0.4"
|
||||||
- MAX_MEMORY: "100mb"
|
|
||||||
ALPINE_VERSION: "3.16.3"
|
|
||||||
REDIS_VERSION: "7.0.4"
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ run=/run/redis
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
install -dm 750 -o redis -g redis $run
|
install -dm 750 -o redis -g redis $run
|
||||||
|
sed -re "s/^(maxmemory ).*/\1${MAX_MEMORY}/" -i /etc/redis.conf
|
||||||
su-exec redis /usr/bin/redis-server /etc/redis.conf
|
su-exec redis /usr/bin/redis-server /etc/redis.conf
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|
Loading…
Reference in a new issue