From 75a9ffe26a75db20eba924643bbc096c02c4563e Mon Sep 17 00:00:00 2001 From: Yuri-Lima Date: Thu, 18 Sep 2025 07:49:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20UPDATE:=20Change=20Redis=20image?= =?UTF-8?q?=20to=20redis:7.2-alpine=20and=20update=20healthcheck=20and=20c?= =?UTF-8?q?ommand=20configurations=20across=20multiple=20docker-compose=20?= =?UTF-8?q?files.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 5a511dd..a70ae2a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -309,10 +309,8 @@ services: # - "./logs:/usr/src/app/packages/dev-server/logs" phoenix-redis: - image: 'bitnami/redis:latest' + image: redis:7.2-alpine container_name: redis - command: /opt/bitnami/scripts/redis/run.sh # Not good, but as agreed. At some point i can start using this: --maxmemory + add eviction policy - user: root # logging: # driver: loki # options: @@ -324,8 +322,7 @@ services: - backend restart: always environment: - ALLOW_EMPTY_PASSWORD: "no" - REDIS_PASSWORD: ${REDIS_PASSWORD} + TZ: Europe/Berlin # deploy: # restart_policy: # Define how the service should restart when it fails # condition: on-failure # Only restart if the container exits with a non-zero code @@ -339,11 +336,22 @@ services: # reservations: # Guaranteed minimum resources for the container # cpus: "0.05" # Reserved CPU cores (5% of one core) # memory: 32M # Reserved memory (32 megabytes) + command: > + redis-server + --requirepass ${REDIS_PASSWORD} + healthcheck: + test: [ + "CMD-SHELL", + "redis-cli -a ${REDIS_PASSWORD} ping | grep PONG && test -w /data" + ] + interval: 5s + retries: 10 + timeout: 5s depends_on: postgres: condition: service_healthy volumes: - - "./redis/data:/bitnami/redis/data" + - ./redis/data:/data networks: backend: