redis
redis copied to clipboard
Add support for config fragments
Using this approach, you can easily override our custom settings or add your own like this:
services:
redis:
image: redis:test
configs:
- source: redis_config
target: /usr/local/etc/redis/conf.d/my.conf
configs:
redis_config:
content: |
port 8000
Which yields
[+] Running 2/0
✔ Network redis_default Created 0.0s
✔ Container redis-redis-1 Created 0.0s
Attaching to redis-1
redis-1 | 1:C 06 Feb 2025 21:16:42.399 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1 | 1:C 06 Feb 2025 21:16:42.399 * Redis version=7.4.2, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1 | 1:C 06 Feb 2025 21:16:42.399 * Configuration loaded
redis-1 | 1:M 06 Feb 2025 21:16:42.399 * monotonic clock: POSIX clock_gettime
redis-1 | 1:M 06 Feb 2025 21:16:42.399 * Running mode=standalone, port=8000.
redis-1 | 1:M 06 Feb 2025 21:16:42.400 * Server initialized
redis-1 | 1:M 06 Feb 2025 21:16:42.400 * Ready to accept connections tcp