jabogram/server/prosody.cfg.lua
2026-02-27 00:32:28 +03:00

46 lines
1.5 KiB
Lua

-- Custom Prosody configuration for Snikket
-- This file is included alongside the auto-generated Snikket config.
----------------------------------------------------------------------
-- PostgreSQL storage
----------------------------------------------------------------------
storage = "sql"
sql = {
driver = "PostgreSQL";
database = "snikket";
host = "127.0.0.1";
port = 5432;
username = "snikket";
password = os.getenv("POSTGRES_PASSWORD");
}
----------------------------------------------------------------------
-- S3 HTTP Upload (via mod_http_upload_external)
----------------------------------------------------------------------
-- Disable built-in upload module, enable external upload
modules_disabled = {
"http_upload";
}
modules_enabled = {
"http_upload_external";
}
-- URL of the external upload service that handles S3 interaction.
-- This is NOT the S3 bucket URL directly. You need to run a separate
-- upload handler service (e.g. prosody-filer, or a custom Lambda/endpoint)
-- that validates Prosody's HMAC signature and proxies files to/from S3.
http_upload_external_base_url = "https://uploads.chat.example.org/upload/"
-- Shared secret between Prosody and the upload handler service
-- (must match the secret configured in the upload handler)
http_upload_external_secret = os.getenv("UPLOAD_SECRET")
-- How long (seconds) the upload URL remains valid
http_upload_external_expire_after = 3600
-- Max file size in bytes (10 MB)
http_upload_external_file_size_limit = 10485760