The app service was missing DISCOURSE_REDIS_HOST entirely, so the bitnami image defaulted to the bare hostname redis. When a service is attached to multiple overlay networks (proxy + internal), bare service-name DNS does not resolve reliably — the stack-prefixed name (${STACK_NAME}_redis) is required. This caused the app to WARN "Hostname redis could not be resolved" and fall into a restart loop.
sidekiq had the same problem for both DB and Redis: DISCOURSE_DATABASE_HOST=db and DISCOURSE_REDIS_HOST=redis used bare hostnames instead of the stack-prefixed service names.
The `app` service was missing `DISCOURSE_REDIS_HOST` entirely, so the bitnami image defaulted to the bare hostname `redis`. When a service is attached to multiple overlay networks (proxy + internal), bare service-name DNS does not resolve reliably — the stack-prefixed name (`${STACK_NAME}_redis`) is required. This caused the app to WARN "Hostname redis could not be resolved" and fall into a restart loop.
`sidekiq` had the same problem for both DB and Redis: `DISCOURSE_DATABASE_HOST=db` and `DISCOURSE_REDIS_HOST=redis` used bare hostnames instead of the stack-prefixed service names.
**Changes:**
- `app`: add `DISCOURSE_REDIS_HOST=${STACK_NAME}_redis`
- `sidekiq`: fix `DISCOURSE_DATABASE_HOST=db` → `${STACK_NAME}_db`
- `sidekiq`: fix `DISCOURSE_REDIS_HOST=redis` → `${STACK_NAME}_redis`
No image or version bump — this is a compose env-var fix only.
cc @trav @notplants
The app service was missing DISCOURSE_REDIS_HOST entirely, so the
bitnami image defaulted to the bare hostname 'redis', which does not
resolve when the service is attached to multiple overlay networks
(proxy + internal) — causing a restart loop.
sidekiq had the same problem worse: both DISCOURSE_DATABASE_HOST=db
and DISCOURSE_REDIS_HOST=redis used bare hostnames instead of the
stack-prefixed service names. On a swarm stack the reliable DNS name
is ${STACK_NAME}_db / ${STACK_NAME}_redis.
autonomic-bot
requested review from trav 2026-06-23 16:48:22 +00:00
autonomic-bot
requested review from notplants 2026-06-23 16:48:23 +00:00
Closing as obsolete: the stack-prefixed hostname fix it proposes is ALREADY in upstream main (DISCOURSE_DB_HOST=${STACK_NAME}_db, DISCOURSE_REDIS_HOST=${STACK_NAME}_redis). This branch is written against the bitnami image (bitnamilegacy/discourse:3.5.0, version 0.8.1+3.5.0, old ruby healthcheck), so merging it would REVERT the official-image migration. upstream main is now discourse/discourse:3.5.3 + discourse/postgres:pg18 (version 1.0.0+3.5.3, commit 9d5c8ae) — the official-image migration landed upstream as coop-cloud/discourse#16. If any hostname issue remains on the official image, please re-raise it against current main.
The live upgrade PR for discourse is #6 (discourse/discourse:3.5.3 → 2026.7.1, redis:7.4-alpine → 8.10-alpine), which applies cleanly on top of current upstream and stays open.
Closing as **obsolete**: the stack-prefixed hostname fix it proposes is ALREADY in upstream main (`DISCOURSE_DB_HOST=${STACK_NAME}_db`, `DISCOURSE_REDIS_HOST=${STACK_NAME}_redis`). This branch is written against the bitnami image (`bitnamilegacy/discourse:3.5.0`, version `0.8.1+3.5.0`, old ruby healthcheck), so merging it would REVERT the official-image migration. upstream main is now `discourse/discourse:3.5.3` + `discourse/postgres:pg18` (version `1.0.0+3.5.3`, commit 9d5c8ae) — the official-image migration landed upstream as coop-cloud/discourse#16. If any hostname issue remains on the official image, please re-raise it against current main.
The live upgrade PR for discourse is #6 (`discourse/discourse:3.5.3 → 2026.7.1`, `redis:7.4-alpine → 8.10-alpine`), which applies cleanly on top of current upstream and stays open.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The
appservice was missingDISCOURSE_REDIS_HOSTentirely, so the bitnami image defaulted to the bare hostnameredis. When a service is attached to multiple overlay networks (proxy + internal), bare service-name DNS does not resolve reliably — the stack-prefixed name (${STACK_NAME}_redis) is required. This caused the app to WARN "Hostname redis could not be resolved" and fall into a restart loop.sidekiqhad the same problem for both DB and Redis:DISCOURSE_DATABASE_HOST=dbandDISCOURSE_REDIS_HOST=redisused bare hostnames instead of the stack-prefixed service names.Changes:
app: addDISCOURSE_REDIS_HOST=${STACK_NAME}_redissidekiq: fixDISCOURSE_DATABASE_HOST=db→${STACK_NAME}_dbsidekiq: fixDISCOURSE_REDIS_HOST=redis→${STACK_NAME}_redisNo image or version bump — this is a compose env-var fix only.
cc @trav @notplants
The app service was missing DISCOURSE_REDIS_HOST entirely, so the bitnami image defaulted to the bare hostname 'redis', which does not resolve when the service is attached to multiple overlay networks (proxy + internal) — causing a restart loop. sidekiq had the same problem worse: both DISCOURSE_DATABASE_HOST=db and DISCOURSE_REDIS_HOST=redis used bare hostnames instead of the stack-prefixed service names. On a swarm stack the reliable DNS name is ${STACK_NAME}_db / ${STACK_NAME}_redis.Closing as obsolete: the stack-prefixed hostname fix it proposes is ALREADY in upstream main (
DISCOURSE_DB_HOST=${STACK_NAME}_db,DISCOURSE_REDIS_HOST=${STACK_NAME}_redis). This branch is written against the bitnami image (bitnamilegacy/discourse:3.5.0, version0.8.1+3.5.0, old ruby healthcheck), so merging it would REVERT the official-image migration. upstream main is nowdiscourse/discourse:3.5.3+discourse/postgres:pg18(version1.0.0+3.5.3, commit9d5c8ae) — the official-image migration landed upstream as coop-cloud/discourse#16. If any hostname issue remains on the official image, please re-raise it against current main.The live upgrade PR for discourse is #6 (
discourse/discourse:3.5.3 → 2026.7.1,redis:7.4-alpine → 8.10-alpine), which applies cleanly on top of current upstream and stays open.Pull request closed