Files
containers/bitnami/discourse/docker-compose.yml
Nick Touran e92a69269f [bitnami/discourse] Fix sidekiq volume mount in docker compose (#79078)
* Fix sidekiq volume mount in docker compose

In 2.4.4-debian-10-r8 release, a change was made noted in the readme that says:

> Discourse and Sidekiq now make use of the same volume to persist data. This solves issues related to being unable to locate some files generated on-demand by the Sidekiq job scheduler.

This change applies this same volume to the docker-compose file. Without the change, sidekiq stalls indefinitely at startup waiting for the discourse DB to be populated. This fixes issues e.g. as noted in #52988

Signed-off-by: Nick Touran <contact@partofthething.com>

* Removed unused sideqik volume

Signed-off-by: Nick Touran <contact@partofthething.com>

---------

Signed-off-by: Nick Touran <contact@partofthething.com>
2025-04-01 16:07:21 +02:00

67 lines
2.1 KiB
YAML

# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
services:
postgresql:
image: docker.io/bitnami/postgresql:latest
volumes:
- 'postgresql_data:/bitnami/postgresql'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- POSTGRESQL_USERNAME=bn_discourse
- POSTGRESQL_DATABASE=bitnami_discourse
redis:
image: docker.io/bitnami/redis:latest
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- 'redis_data:/bitnami/redis'
discourse:
image: docker.io/bitnami/discourse:3
ports:
- '80:3000'
volumes:
- 'discourse_data:/bitnami/discourse'
depends_on:
- postgresql
- redis
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- DISCOURSE_HOST=www.example.com
- DISCOURSE_DATABASE_HOST=postgresql
- DISCOURSE_DATABASE_PORT_NUMBER=5432
- DISCOURSE_DATABASE_USER=bn_discourse
- DISCOURSE_DATABASE_NAME=bitnami_discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- POSTGRESQL_CLIENT_POSTGRES_USER=postgres
- POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_discourse
- POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS=hstore,pg_trgm
sidekiq:
image: docker.io/bitnami/discourse:3
depends_on:
- discourse
volumes:
- 'discourse_data:/bitnami/discourse'
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- DISCOURSE_HOST=www.example.com
- DISCOURSE_DATABASE_HOST=postgresql
- DISCOURSE_DATABASE_PORT_NUMBER=5432
- DISCOURSE_DATABASE_USER=bn_discourse
- DISCOURSE_DATABASE_NAME=bitnami_discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
volumes:
postgresql_data:
driver: local
redis_data:
driver: local
discourse_data:
driver: local