Update docs and add matrix registration config

This commit is contained in:
Grant 2025-02-02 16:37:07 -07:00
parent 4514c6c226
commit b26451d584
3 changed files with 94 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
kgnot/config.production.json
53ll/config.production.json

View File

@ -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": <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": <user>,
"password": <password>,
"database": <database>
}
}
}
```
#### Create db and user
```sh
CREATE DATABASE kgnot_ghost;

View File

@ -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)'