Skip to content

fix(docker): mount the redis config that actually exists - #3285

Open
forgetso wants to merge 2 commits into
mainfrom
fix/redis-conf-mount-path
Open

forgetso wants to merge 2 commits into
mainfrom
fix/redis-conf-mount-path

Conversation

@forgetso

Copy link
Copy Markdown
Member

What changed

docker-compose.test.yml and docker-compose.development.yml mount ./redis/redis.conf instead of ./redis.conf.

What was wrong

Relative to those two files, ./redis.conf resolves to docker/redis.conf — which isn't in the repo. The config lives at docker/redis/redis.conf.

Docker doesn't fail on a missing bind source. It creates an empty directory at that path and mounts it over /redis-stack.conf, so redis has been starting on REDIS_ARGS alone and ignoring the config entirely — and leaving a stray docker/redis.conf/ directory behind on every host that ran it.

The two sibling compose files in docker/redis/ have the path right, because they sit next to the config. The ones a directory up don't.

Found while isolating the test stack's ports in captcha-private: the file the compose said it needed wasn't there, on any machine.

What effect it has

Redis in test and development now picks up what the config was written to set:

appendonly yes
maxmemory 2gb
maxmemory-policy allkeys-lru

That is a behaviour change, which is why it's worth reviewing rather than rubber-stamping: with no maxmemory, redis grows unbounded and the default noeviction policy makes writes fail once it's full; with the config, it caps at 2 GB and evicts least-recently-used keys.

Deliberately not included

docker-compose.provider.yml:249 has the identical broken path, so production redis is also running without the memory cap and eviction policy. I've left that file untouched here: it's the same one-line fix, but it changes how live providers behave under memory pressure and deserves to land on its own rather than riding along with a test change. Happy to raise it separately — worth deciding whether 2 GB and allkeys-lru are still the right numbers for a provider before switching them on.

Test coverage

None added — this is a compose path. The suites that use these files exercise it: redis either starts with the config or it doesn't.

🤖 Generated with Claude Code

docker-compose.test.yml and docker-compose.development.yml mount ./redis.conf,
which relative to those files is docker/redis.conf — not in the repo. The file
is docker/redis/redis.conf. Docker does not fail on a missing bind source: it
creates an empty directory at the path and mounts that over /redis-stack.conf,
so redis has been running on REDIS_ARGS alone, ignoring the config, and leaving
a stray docker/redis.conf/ directory on every host that ran it.

The sibling files in docker/redis/ get it right because they sit beside the
config; the ones a directory up do not.

docker-compose.provider.yml has the same bug and is left alone deliberately:
fixing it changes how production redis behaves under memory pressure and should
land on its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

No updates since 2026-09-16T13:04:03Z (over 1 days), so this PR has been converted to draft. That stops it holding CI runners.

Nothing is lost — gh pr ready 3285, or the "Ready for review" button, picks it straight back up. Add the keep-ready label to exempt it permanently.

Converting to draft disables auto-merge, so PRs with auto-merge enabled are excluded from this entirely.

@github-actions

Copy link
Copy Markdown
Contributor

No updates since 2026-09-17T18:01:22Z (over 1 days), so this PR has been converted to draft. That stops it holding CI runners.

Nothing is lost — gh pr ready 3285, or the "Ready for review" button, picks it straight back up. Add the keep-ready label to exempt it permanently.

Converting to draft disables auto-merge, so PRs with auto-merge enabled are excluded from this entirely.

@github-actions

Copy link
Copy Markdown
Contributor

No updates since 2026-09-19T00:01:55Z (over 1 days), so this PR has been converted to draft. That stops it holding CI runners.

Nothing is lost — gh pr ready 3285, or the "Ready for review" button, picks it straight back up. Add the keep-ready label to exempt it permanently.

Converting to draft disables auto-merge, so PRs with auto-merge enabled are excluded from this entirely.

@github-actions

Copy link
Copy Markdown
Contributor

No updates since 2026-09-20T06:01:47Z (over 1 days), so this PR has been converted to draft. That stops it holding CI runners.

Nothing is lost — gh pr ready 3285, or the "Ready for review" button, picks it straight back up. Add the keep-ready label to exempt it permanently.

Converting to draft disables auto-merge, so PRs with auto-merge enabled are excluded from this entirely.

@github-actions

Copy link
Copy Markdown
Contributor

No updates since 2026-09-21T12:01:17Z (over 1 days), so this PR has been converted to draft. That stops it holding CI runners.

Nothing is lost — gh pr ready 3285, or the "Ready for review" button, picks it straight back up. Add the keep-ready label to exempt it permanently.

Converting to draft disables auto-merge, so PRs with auto-merge enabled are excluded from this entirely.

This branch has not been deployed

No deployments
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