Last active
August 14, 2025 19:36
-
-
Save arifnd/61c264971e0a581615f00671bbd07a34 to your computer and use it in GitHub Desktop.
Docker compose file for redis ssl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.8' | |
| services: | |
| redis: | |
| image: bitnami/redis:7.4 | |
| ports: | |
| - "0.0.0.0:6379:6379" | |
| env_file: .env | |
| environment: | |
| - REDIS_TLS_ENABLED=yes | |
| - REDIS_TLS_AUTH_CLIENTS=no | |
| - REDIS_TLS_CERT_FILE=/certs/certificate.crt | |
| - REDIS_TLS_KEY_FILE=/certs/privatekey.key | |
| - REDIS_TLS_CA_FILE=/etc/ssl/certs/ISRG_Root_X2.pem | |
| - REDIS_TLS_PORT=6379 | |
| - REDIS_PORT=0 | |
| - REDIS_PASSWORD=123456 | |
| - REDIS_EXTRA_FLAGS=--maxmemory 512mb --maxmemory-policy allkeys-lru | |
| volumes: | |
| - /etc/easypanel/traefik/dump/example.com:/certs:ro | |
| - redis_data:/bitnami/redis/data | |
| restart: always | |
| healthcheck: | |
| test: > | |
| sh -c "redis-cli -h 127.0.0.1 -p 6379 \ | |
| --tls --cacert /etc/ssl/certs/ISRG_Root_X2.pem \ | |
| -a ${REDIS_PASSWORD} PING | grep PONG" | |
| interval: 30s | |
| timeout: 5s | |
| retries: 3 | |
| start_period: 10s | |
| volumes: | |
| redis_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment