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

View file

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