sqlinsight-pro/deploy/forum/app.yml
Claude 69fa641f26
Some checks are pending
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
deploy hub / deploy (push) Successful in 24s
CI / Build og unit tests (push) Successful in 56s
deploy community / deploy (push) Successful in 1s
CI / MSI-installer (push) Successful in 33s
Websted og forum bag SEOSofts reverse proxy på appserveren
- deploy-community.yml: bygger og starter webstedet ved push (som hubben),
  bundet til DMZ-adressen. Springes over, indtil COMMUNITY_PORT er sat.
  Feedet læses skrivebeskyttet fra hubbens feed-mappe; download-links går
  til hub.sqlinsight.seosoft.dk/updates/ (ny indstilling DownloadUrl).
- deploy-forum.yml (manuel): kører discourse_docker-launcheren i en
  helper-container med /var/discourse og docker.sock fra værten.
  app.yml er en skabelon, som render.py udfylder fra secrets.
- Discourse uden egen TLS: lytter på DMZ-adressen, tvinger https-links og
  tager klient-IP fra X-Forwarded-For fra proxyen (ellers rammer rate
  limiting alle brugere samlet).
- Caddy-opsætningen er fjernet; docs/community.md beskriver secrets og
  proxy-opsætning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3EExwndy8Z22EK2Qpt6BK
2026-09-29 13:59:53 +00:00

77 lines
2.7 KiB
YAML

## SQLInsight Pro community forum (forum.sqlinsight.seosoft.dk): Discourse with the official discourse_docker launcher.
## See docs/community.md.
##
## This is a template: the double-braced names are filled in by render.py from environment variables (Forgejo secrets in
## .forgejo/workflows/deploy-forum.yml, or exported by hand before deploy/forum/install.sh). Nothing secret is committed.
##
## The forum runs behind SEOSoft's reverse proxy, which terminates TLS (like the hub). The proxy must send
## Host, X-Forwarded-For and X-Forwarded-Proto: https, and allow WebSocket/long polling (/message-bus/).
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## Only on the DMZ address, where the reverse proxy reaches it.
expose:
- "{{FORUM_BIND}}:{{FORUM_PORT}}:80"
params:
## Danish stemming for search.
db_default_text_search_config: "pg_catalog.danish"
## About 25 % of the memory Discourse may use.
db_shared_buffers: "{{FORUM_DB_SHARED_BUFFERS}}"
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
DISCOURSE_DEFAULT_LOCALE: da
## About 2 per CPU core.
UNICORN_WORKERS: {{FORUM_WORKERS}}
DISCOURSE_HOSTNAME: '{{FORUM_HOSTNAME}}'
## TLS is terminated by the reverse proxy; all links must still be https.
DISCOURSE_FORCE_HTTPS: true
## Who becomes administrator when signing up with these addresses (comma separated).
DISCOURSE_DEVELOPER_EMAILS: '{{FORUM_ADMIN_EMAIL}}'
## Mail server. Discourse cannot work without it (sign-up, notifications, password reset).
DISCOURSE_SMTP_ADDRESS: '{{FORUM_SMTP_ADDRESS}}'
DISCOURSE_SMTP_PORT: {{FORUM_SMTP_PORT}}
DISCOURSE_SMTP_USER_NAME: '{{FORUM_SMTP_USER}}'
DISCOURSE_SMTP_PASSWORD: '{{FORUM_SMTP_PASSWORD}}'
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_NOTIFICATION_EMAIL: '{{FORUM_NOTIFICATION_EMAIL}}'
volumes:
- volume:
host: /var/discourse/shared/standalone
guest: /shared
- volume:
host: /var/discourse/shared/standalone/log/var-log
guest: /var/log
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
## Upgrades from the admin page.
- git clone https://github.com/discourse/docker_manager.git
run:
- exec: echo "Beginning of custom commands"
## Real client addresses from the reverse proxy. Without this every visitor looks like the proxy, and
## web.ratelimited would throttle them all together.
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /server \{/
to: |
server {
set_real_ip_from {{KNOWN_PROXY}};
real_ip_header X-Forwarded-For;
real_ip_recursive on;
- exec: echo "End of custom commands"