From b26451d5848f0caf2ab1775ad59bc63320c69d34 Mon Sep 17 00:00:00 2001 From: Grant <5445379+grantdhunter@users.noreply.github.com> Date: Sun, 2 Feb 2025 16:37:07 -0700 Subject: [PATCH] Update docs and add matrix registration config --- .gitignore | 2 ++ README.md | 45 +++++++++++++++++++++++++++++++ matrix-registration/config.yaml | 47 +++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 .gitignore create mode 100644 matrix-registration/config.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a8b887 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +kgnot/config.production.json +53ll/config.production.json \ No newline at end of file diff --git a/README.md b/README.md index 8183258..2d6201c 100644 --- a/README.md +++ b/README.md @@ -108,12 +108,57 @@ helm upgrade --create-namespace \ ``` ### Install Matrix Registration +TODO: make this a helm app or replace with something better ```sh kubeclt apply -k matrix-registration ``` ## Ghost Blogs ### kngot +I got tired of fighting the docker container so I manually overrode the `config.production.json` +which looks like +``` +{ + "url": , + "server": { + "port": 2368, + "host": "::" + }, + "mail": { + "transport": "SMTP", + "options": { + "host": "smtp.sendgrid.net", + "service": "SendGrid", + "port": 465, + "secure": true, + "tls": { + "requireTLS": true + } + } + }, + "logging": { + "transports": [ + "file", + "stdout" + ] + }, + "process": "local", + "paths": { + "contentPath": "/opt/bitnami/ghost/content" + }, + "database": { + "client": "mysql", + "connection": { + "host": "mariadb.datastore.svc.cluster.local", + "port": 3306, + "user": , + "password": , + "database": + } + } +} +``` + #### Create db and user ```sh CREATE DATABASE kgnot_ghost; diff --git a/matrix-registration/config.yaml b/matrix-registration/config.yaml new file mode 100644 index 0000000..15bf9bd --- /dev/null +++ b/matrix-registration/config.yaml @@ -0,0 +1,47 @@ +server_location: 'http://goatchat-matrix-synapse:8008' +server_name: 'goatchat.ca' +registration_shared_secret: #replace with shared registration secret +admin_api_shared_secret: # replace with admin api shared secret +base_url: '/gate' # e.g. '/element' for https://example.tld/element/register +client_redirect: 'https://app.element.io/#/login' +client_logo: 'static/images/element-logo.png' # use '{cwd}' for current working directory +db: 'sqlite:///{cwd}db.sqlite3' +host: '0.0.0.0' +port: 5000 +rate_limit: ["100 per day", "10 per minute"] +allow_cors: false +ip_logging: false +logging: + disable_existing_loggers: false + version: 1 + root: + level: DEBUG + handlers: [console] + formatters: + brief: + format: '%(name)s - %(levelname)s - %(message)s' + precise: + format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' + handlers: + console: + class: logging.StreamHandler + level: INFO + formatter: brief + stream: ext://sys.stdout + file: + class: logging.handlers.RotatingFileHandler + formatter: precise + level: INFO + filename: m_reg.log + maxBytes: 10485760 # 10MB + backupCount: 3 + encoding: utf8 +# password requirements +password: + min_length: 8 +# username requirements +username: + validation_regex: [] #list of regexes that the selected username must match. Example: '[a-zA-Z]\.[a-zA-Z]' + invalidation_regex: ['(admin|support|password)'] #list of regexes that the selected username must NOT match. Example: '(admin|support)' + +