Last active
June 22, 2025 02:16
-
-
Save featheredtoast/efea6feca8a1c161a5abb390bac05ac3 to your computer and use it in GitHub Desktop.
discourse docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
# Mailhog for testing... | |
mail: | |
image: mailhog/mailhog | |
ports: | |
- 8025:8025 | |
redis: | |
image: redis | |
volumes: | |
- /var/discourse/shared/discourse/redis:/data | |
# separate db instance | |
db: | |
image: pgvector/pgvector:pg17 | |
volumes: | |
- /var/discourse/shared/discourse/data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: discourse | |
POSTGRES_PASSWORD: SOME_SECRET | |
POSTGRES_DB: discourse | |
web: | |
image: local_discourse/web_only | |
volumes: | |
- /var/discourse/shared/discourse/web:/shared | |
- /var/discourse/shared/discourse/web/log/var-log:/var/log | |
links: | |
- db | |
- redis | |
environment: | |
DISCOURSE_DB_HOST: db | |
DISCOURSE_DB_PASSWORD: SOME_SECRET | |
DISCOURSE_DEVELOPER_EMAILS: [email protected] | |
DISCOURSE_HOSTNAME: localhost | |
DISCOURSE_REDIS_HOST: redis | |
DISCOURSE_SMTP_ADDRESS: mail | |
DISCOURSE_SMTP_PORT: 1025 | |
DISCOURSE_SMTP_PASSWORD: pa$$word | |
DISCOURSE_SMTP_USER_NAME: [email protected] | |
ports: | |
- 443:443 | |
- 80:80 | |
depends_on: | |
- db | |
- redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
# Mailhog for testing... | |
mail: | |
image: mailhog/mailhog | |
ports: | |
- 8025:8025 | |
redis: | |
image: redis | |
volumes: | |
- /var/discourse/shared/web-only/redis:/data | |
# separate db instance | |
db: | |
image: pgvector/pgvector:pg17 | |
volumes: | |
- /var/discourse/shared/web-only/data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: discourse | |
POSTGRES_PASSWORD: SOME_SECRET | |
POSTGRES_DB: discourse | |
web: | |
image: local_discourse/web_only | |
volumes: | |
- /var/discourse/shared/discourse/web:/shared | |
- /var/discourse/shared/discourse/web/log/var-log:/var/log | |
links: | |
- db | |
- redis | |
environment: | |
DISCOURSE_DB_HOST: db | |
DISCOURSE_DB_PASSWORD: SOME_SECRET | |
DISCOURSE_DEVELOPER_EMAILS: [email protected] | |
DISCOURSE_HOSTNAME: localhost | |
DISCOURSE_REDIS_HOST: redis | |
DISCOURSE_SMTP_ADDRESS: mail | |
DISCOURSE_SMTP_PORT: 1025 | |
DISCOURSE_SMTP_PASSWORD: pa$$word | |
DISCOURSE_SMTP_USER_NAME: [email protected] | |
# These could be bundled in as default env on the base image | |
RAILS_ENV: 'production' | |
UNICORN_WORKERS: 3 | |
UNICORN_SIDEKIQS: 1 | |
RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 40000 | |
RUBY_GC_HEAP_INIT_SLOTS: 400000 | |
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.5 | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
LANGUAGE: en_US.UTF-8 | |
MIGRATE_ON_BOOT: 1 | |
PRECOMPILE_ON_BOOT: 1 | |
ports: | |
- 443:443 | |
- 80:80 | |
depends_on: | |
- db | |
- redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment