Merge the forum (community module) into main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-26 16:43:19 +00:00
co-authored by Claude Opus 5.5
131 changed files with 17773 additions and 357 deletions
+3
View File
@@ -18,6 +18,9 @@ MAIL_FROM=Sorsfonalak <hello@sorsfonalak.hu>
# invite: new accounts need an invitation (default); open: anyone can sign up
SIGNUP_MODE=invite
# The forum (docs/kozosseg.md): it always runs, visitors see it once this is set
# FORUM_URL=http://forum:8083
# Image version; every deployment rewrites it
TAG=latest
+14 -4
View File
@@ -15,10 +15,20 @@
# No basic auth any more: the site is open, and new accounts need an
# invitation (SIGNUP_MODE=invite in the backend).
encode zstd gzip
reverse_proxy frontend:3000 {
# The address the backend trusts (rate limits, share visits); it
# overwrites whatever the browser sent in this header.
header_up X-Real-IP {client_ip}
# The forum's live connection (WebSocket) goes straight to the forum
# service: the frontend's /api/v1 proxy cannot carry it.
handle /api/v1/forum/ws {
rewrite * /v1/forum/ws
reverse_proxy forum:8083 {
header_up X-Real-IP {client_ip}
}
}
handle {
reverse_proxy frontend:3000 {
# The address the backend trusts (rate limits, share visits); it
# overwrites whatever the browser sent in this header.
header_up X-Real-IP {client_ip}
}
}
}
+33 -2
View File
@@ -137,7 +137,10 @@ services:
image: ${REGISTRY_PREFIX:-registry.sagifer.com/sagifer/sorsfonalak}-worker:${TAG:-latest}
environment:
DATABASE_URL: postgres://sorsfonalak:${POSTGRES_PASSWORD}@postgres:5432/sorsfonalak
WORKER_TASKS: email,cleanup,invoices,notify
# forum: the forum's digests, daily sky thread, listener e-mails, weekly summary.
WORKER_TASKS: email,cleanup,invoices,notify,forum
# The sky of the forum's daily thread.
BACKEND_URL: http://backend:8081
# Purchase notices to Telegram; the bot token (TELEGRAM_BOT_TOKEN) is in .env.secrets.
TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-}
# SMTP_URL or the SES credentials come from .env.secrets (docs/levelkuldes.md);
@@ -189,6 +192,32 @@ services:
logging: *logging
restart: unless-stopped
# The forum (docs/kozosseg.md): its own service on the same database and
# login; switched on for the visitors by FORUM_URL in the frontend below.
forum:
image: ${REGISTRY_PREFIX:-registry.sagifer.com/sagifer/sorsfonalak}-forum:${TAG:-latest}
environment:
DATABASE_URL: postgres://sorsfonalak:${POSTGRES_PASSWORD}@postgres:5432/sorsfonalak
# The links in the forum's e-mails.
PUBLIC_BASE_URL: https://${DOMAIN}
# Uploaded avatars: the same Spaces bucket as the backend's photos
# (S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY in .env.secrets).
S3_ENDPOINT: ${S3_ENDPOINT:-}
S3_BUCKET: ${S3_BUCKET:-}
S3_REGION: ${S3_REGION:-us-east-1}
LOG_DIR: /logs
env_file:
- path: .env.secrets
required: false
depends_on:
postgres:
condition: service_healthy
read_only: true
volumes:
- logs:/logs
logging: *logging
restart: unless-stopped
frontend:
image: ${REGISTRY_PREFIX:-registry.sagifer.com/sagifer/sorsfonalak}-frontend:${TAG:-latest}
environment:
@@ -196,6 +225,8 @@ services:
HOROSCOPE_API_URL: http://horoscope-api:8080
# Absolute links of the share previews (og:image).
PUBLIC_BASE_URL: https://${DOMAIN}
# The forum: off until FORUM_URL=http://forum:8083 is in .env (no menu item, its pages 404).
FORUM_URL: ${FORUM_URL:-}
depends_on:
backend:
condition: service_healthy
@@ -225,7 +256,7 @@ services:
volumes:
pgdata:
# Backend and worker logs (backend.YYYY-MM-DD.log, worker…, worker-ai…).
# Backend, worker and forum logs (backend.YYYY-MM-DD.log, worker…, worker-ai…, forum…).
logs:
caddy-data:
caddy-config: