82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
## Discourse container config for cadCAD community forum
|
|
## Deployed behind Traefik reverse proxy on Netcup RS 8000
|
|
##
|
|
## This file gets copied to /opt/discourse/containers/app.yml on the server.
|
|
## After editing, rebuild with: cd /opt/discourse && ./launcher rebuild app
|
|
|
|
templates:
|
|
- "templates/postgres.template.yml"
|
|
- "templates/redis.template.yml"
|
|
- "templates/web.template.yml"
|
|
## SSL handled by Cloudflare/Traefik - do NOT enable these:
|
|
# - "templates/web.ssl.template.yml"
|
|
# - "templates/web.letsencrypt.ssl.template.yml"
|
|
- "templates/web.ratelimited.template.yml"
|
|
|
|
## No direct port exposure - Traefik routes traffic via Docker network
|
|
## expose:
|
|
## - "80:80"
|
|
|
|
params:
|
|
db_default_text_search_config: "pg_catalog.english"
|
|
## 2GB total container limit, tune DB accordingly
|
|
db_shared_buffers: "128MB"
|
|
db_work_mem: "10MB"
|
|
|
|
env:
|
|
LC_ALL: en_US.UTF-8
|
|
LANG: en_US.UTF-8
|
|
LANGUAGE: en_US.UTF-8
|
|
|
|
DISCOURSE_DEFAULT_LOCALE: en
|
|
|
|
## Temporary domain - will switch to community.cadcad.org later
|
|
DISCOURSE_HOSTNAME: 'cadcad-forum.jeffemmett.com'
|
|
|
|
## Admin email for initial setup
|
|
DISCOURSE_DEVELOPER_EMAILS: 'jeff@jeffemmett.com'
|
|
|
|
## SMTP - configure when ready (forum works without it but can't send emails)
|
|
## Uncomment and fill in when email provider is chosen:
|
|
# DISCOURSE_SMTP_ADDRESS: smtp.example.com
|
|
# DISCOURSE_SMTP_PORT: 587
|
|
# DISCOURSE_SMTP_USER_NAME: user@example.com
|
|
# DISCOURSE_SMTP_PASSWORD: "password"
|
|
# DISCOURSE_SMTP_ENABLE_START_TLS: true
|
|
# DISCOURSE_SMTP_DOMAIN: cadcad.org
|
|
# DISCOURSE_NOTIFICATION_EMAIL: noreply@cadcad.org
|
|
|
|
## Serve behind reverse proxy
|
|
DISCOURSE_FORCE_HTTPS: true
|
|
|
|
volumes:
|
|
- volume:
|
|
host: /opt/discourse/shared/standalone
|
|
guest: /shared
|
|
- volume:
|
|
host: /opt/discourse/shared/standalone/log/var-log
|
|
guest: /var/log
|
|
|
|
hooks:
|
|
after_code:
|
|
- exec:
|
|
cd: $home/plugins
|
|
cmd:
|
|
## Add plugins here (uncomment as needed):
|
|
# - git clone https://github.com/discourse/docker_manager.git
|
|
# - git clone https://github.com/discourse/discourse-solved.git
|
|
# - git clone https://github.com/discourse/discourse-voting.git
|
|
- echo "Plugin installation complete"
|
|
|
|
## Memory limit: 2GB container + 2GB swap
|
|
run:
|
|
- exec: echo "Beginning of custom commands"
|
|
|
|
## Traefik integration labels
|
|
labels:
|
|
app_name: discourse
|
|
traefik.enable: "true"
|
|
traefik.docker.network: traefik-public
|
|
traefik.http.routers.discourse.rule: "Host(`cadcad-forum.jeffemmett.com`)"
|
|
traefik.http.services.discourse.loadbalancer.server.port: "80"
|