🔧 UPDATE: Change Redis image to redis:7.2-alpine and update healthcheck and command configurations across multiple docker-compose files.

This commit is contained in:
2025-09-18 07:49:41 +02:00
parent 486ec457d0
commit 75a9ffe26a

View File

@@ -309,10 +309,8 @@ services:
# - "./logs:/usr/src/app/packages/dev-server/logs" # - "./logs:/usr/src/app/packages/dev-server/logs"
phoenix-redis: phoenix-redis:
image: 'bitnami/redis:latest' image: redis:7.2-alpine
container_name: redis 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: # logging:
# driver: loki # driver: loki
# options: # options:
@@ -324,8 +322,7 @@ services:
- backend - backend
restart: always restart: always
environment: environment:
ALLOW_EMPTY_PASSWORD: "no" TZ: Europe/Berlin
REDIS_PASSWORD: ${REDIS_PASSWORD}
# deploy: # deploy:
# restart_policy: # Define how the service should restart when it fails # 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 # 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 # reservations: # Guaranteed minimum resources for the container
# cpus: "0.05" # Reserved CPU cores (5% of one core) # cpus: "0.05" # Reserved CPU cores (5% of one core)
# memory: 32M # Reserved memory (32 megabytes) # 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: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
volumes: volumes:
- "./redis/data:/bitnami/redis/data" - ./redis/data:/data
networks: networks:
backend: backend: