Doc/Sample improvement: cron via docker-compose needs Redis-environment as well
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 7.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
This had me scratching my head a bit: I've set REDIS_HOST for the app:-target in the Apache docker-compose-file, and every five minutes (when cron comes around) I would get Redis server went away stains in the log.
It turns out that of course the solution is to pass the REDIS_{HOST, PORT} environment variables also to the cron:-target, e.g. in https://github.com/nextcloud/docker/blob/4cf9a20fdf5740e92e3b213a52d463c88449559a/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml#L41.
I suggest to add the REDIS_*-variables to the cron:-section in the example template (possibly elsewhere?) to remind folks to do this.
[Or I misdiagnosed the issue, and I have some other problem – I had assumed the whole time that the cron-container would just trigger tasks in the running instance, but apparently that wasn't the case.]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open .examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml around line 41 and compare the environment variables on the app and cron services. Update the example so cron receives the REDIS_HOST and REDIS_PORT variables, then verify the compose configuration remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, redis
- Domain
- devops, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100