baytechc / waasabi-matrix

Waasabi Matrix integration
Apache License 2.0
0 stars 0 forks source link

Configuration via a config file #2

Closed flaki closed 3 years ago

flaki commented 3 years ago

As discussed move the current configuration that is heavily based in environment variables into a more streamlined config file based approach.

badboy commented 3 years ago

Probably going with TOML. Something like that:

[server]
homeserver = "your-matrix-server.example.com"
user = "botuser"
password = "botpassword"
admins = [
  "@admin:server.example.com"
]

[api]
listen = "127.0.0.1:8383"
secret = "secret-api-token"

[strapi]
host = "your-strapi-host.example.com"
user = "strapi-user"
password = "strapi-password"

Later we can extend it so that the passwords can be externally specified for security

flaki commented 3 years ago

Yeah this sounds fine for now, we store a bunch of credentials in an ENV file anyway. Any improvements there would probably be platform-specific so that can be set aside for a future iteration.