configurable memory

This commit is contained in:
f 2022-03-07 14:24:20 -03:00
parent 3052602c43
commit afd011bcc0
2 changed files with 8 additions and 2 deletions

View file

@ -4,9 +4,10 @@ pipeline:
registry: registry.nulo.in
repo: registry.nulo.in/sutty/redis
tags:
- ${ALPINE_VERSION}
- ${ALPINE_VERSION}-${MAX_MEMORY}
- latest
build_args:
- MAX_MEMORY=${MAX_MEMORY}
- ALPINE_VERSION=${ALPINE_VERSION}
- BASE_IMAGE=registry.nulo.in/sutty/monit
username: sutty
@ -16,6 +17,8 @@ pipeline:
branch: antifascista
event: push
matrix:
MAX_MEMORY:
- "100mb"
ALPINE_VERSION:
- 3.13.7
- 3.14.3

View file

@ -1,8 +1,11 @@
ARG MAX_MEMORY=100mb
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
MAINTAINER "f <f@sutty.nl>"
ARG MAX_MEMORY
RUN apk add --no-cache redis
RUN sed -re "/^bind /d" -i /etc/redis.conf
@ -14,7 +17,7 @@ RUN echo "pidfile /run/redis/redis.pid" >> /etc/redis.conf
RUN echo "daemonize yes" >> /etc/redis.conf
RUN echo "protected-mode no" >> /etc/redis.conf
RUN echo "maxmemory-policy allkeys-lfu" >> /etc/redis.conf
RUN echo "maxmemory 100mb" >> /etc/redis.conf
RUN echo "maxmemory ${MAX_MEMORY}" >> /etc/redis.conf
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit