🔧 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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user