#!/bin/sh # docker/redis/docker-entrypoint.sh # ============================================================================ # Redis Entrypoint Script for Dev Container # ============================================================================ # This script ensures the Redis log directory exists and is writable before # starting Redis. This is needed because the redis_logs volume is mounted # at /var/log/redis but Redis Alpine runs as a non-root user. # # Related: ADR-050 (Log aggregation via Logstash) # ============================================================================ set -e # Create log directory if it doesn't exist mkdir -p /var/log/redis # Ensure redis user can write to the log directory # Note: In Alpine Redis image, redis runs as uid 999 chown -R redis:redis /var/log/redis chmod 755 /var/log/redis # Start Redis with the provided arguments exec redis-server "$@"