mastodon / flodgatt

A blazingly fast drop-in replacement for the Mastodon streaming API server
GNU Affero General Public License v3.0
86 stars 8 forks source link

Add additional configuration variables #23

Closed codesections closed 4 years ago

codesections commented 5 years ago

We should configuration options to match the configuration options in tootsuite/mastodon, as described in the documentation.

Specifically, we should add the following variables:

PostgreSQL

Redis

Deployment

Are there any others that we should also add?

[EDIT: We should also remove .env from version control (though we could have a example config). When doing so, it might also make sense to switch from pretty_env_logger to env_logger, which has essentially the same API and would let us set the default log level without an env variable.]

Gargron commented 5 years ago
codesections commented 5 years ago

We also need to add an environmental variable that specifies what other environmental variables to use. flodgatt should read the other env vars from a .env file with that post-fix. For example, if the variable is set to development, flodgatt should read other variables from .env.production.

The user should be able to set this variable as NODE_ENV (for backwards compatibility) or as RUST_ENV (to be clearer). If both are set, RUST_ENV should take precedence.

codesections commented 4 years ago

Closing this for now. Depending on how Mastodon ends up handling TRUSTED_PROXY_IP, we may want to reopen later. Also, we currently support DB_SSLMODE only in that we acknowledge it and print a warning that we don't yet support using SSL with Postgres (#41). When we add SSL support, we'll obviously need to expand our handling of that environmental variable.