Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for config fragments #432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LaurentGoderre
Copy link
Contributor

@LaurentGoderre LaurentGoderre commented Feb 6, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant