diff options
author | Calvin Morrison <calvin@pobox.com> | 2025-09-03 21:15:36 -0400 |
---|---|---|
committer | Calvin Morrison <calvin@pobox.com> | 2025-09-03 21:15:36 -0400 |
commit | 49fa5aa2a127bdf8924d02bf77e5086b39c7a447 (patch) | |
tree | 61d86a7705dacc9fddccc29fa79d075d83ab8059 /server/config/sys.config.template |
Diffstat (limited to 'server/config/sys.config.template')
-rw-r--r-- | server/config/sys.config.template | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/server/config/sys.config.template b/server/config/sys.config.template new file mode 100644 index 0000000..3df3ba8 --- /dev/null +++ b/server/config/sys.config.template @@ -0,0 +1,34 @@ +[ + {jchat, [ + {http_port, ${HTTP_PORT:-8080}}, + {api_domain, "${API_DOMAIN:-api.jchat.com}"}, + {web_domain, "${WEB_DOMAIN:-web.jchat.com}"}, + {static_files_dir, "${STATIC_FILES_DIR:-/var/www/jchat}"}, + {cors_origins, ["${CORS_ORIGINS:-https://web.jchat.com}"]}, + {jwt_secret, "${JWT_SECRET:-CHANGE_ME_IN_PRODUCTION}"}, + {database, [ + {backend, mnesia}, + {data_dir, "${DATA_DIR:-/var/lib/jchat/data}"} + ]}, + {auth, [ + {bcrypt_rounds, ${BCRYPT_ROUNDS:-12}}, + {token_expiry_hours, ${TOKEN_EXPIRY_HOURS:-24}}, + {allow_registration, ${ALLOW_REGISTRATION:-true}} + ]} + ]}, + {kernel, [ + {logger_level, ${LOG_LEVEL:-info}}, + {logger, [ + {handler, default, logger_std_h, #{ + config => #{file => "${LOG_FILE:-/var/log/jchat/jchat.log}"}, + formatter => {logger_formatter, #{ + single_line => true, + template => [time," [",level,"] ",msg,"\n"] + }} + }} + ]} + ]}, + {mnesia, [ + {dir, "${MNESIA_DIR:-/var/lib/jchat/mnesia}"} + ]} +]. |