From 4a77e93dfd41d378213444fe555ddca573f62c4c Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 23 May 2023 19:51:55 +0200 Subject: [PATCH] document environment variables --- docs/install-docker.md | 3 ++- docs/install.md | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/install-docker.md b/docs/install-docker.md index 9444c5ace..435b09bd6 100644 --- a/docs/install-docker.md +++ b/docs/install-docker.md @@ -38,10 +38,11 @@ cp .config/docker_example.env .config/docker.env Edit `default.yml` and `docker.env` according to the instructions in the files. You will need to set the database host to `db` and Redis host to `redis` in order to use the internal container network for these services. - Edit `docker-compose.yml` if necessary. (e.g. if you want to change the port). If you are using SELinux (eg. you're on Fedora or a RHEL derivative), you'll want to add the `Z` mount flag to the volume mounts to allow the containers to access the contents of those volumes. +Also check out the [Configure Foundkey](./install.md#configure-foundkey) section in the ordinary installation instructions. + ## Build and initialize The following command will build FoundKey and initialize the database. This will take some time. diff --git a/docs/install.md b/docs/install.md index 055c5a590..ce5452a1d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -78,6 +78,21 @@ There are instructions for setting up [nginx](./nginx.md) for this purpose. ### Changing the default Reaction You can change the default reaction that is used when an ActivityPub "Like" is received from '👍' to '⭐' by changing the boolean value `meta.useStarForReactionFallback` in the databse respectively. +### Environment variables +There are some behaviour changes which can be accomplished using environment variables. + +|variable name|meaning| +|---|---| +|`FK_ONLY_QUEUE`|If set, only the queue processing will be run. The frontend will not be available. Cannot be combined with `FK_ONLY_SERVER` or `FK_DISABLE_CLUSTERING`.| +|`FK_ONLY_SERVER`|If set, only the frontend will be run. Queues will not be processed. Cannot be combined with `FK_ONLY_QUEUE` or `FK_DISABLE_CLUSTERING`.| +|`FK_NO_DAEMONS`|If set, the server statistics and queue statistics will not be run.| +|`FK_DISABLE_CLUSTERING`|If set, all work will be done in a single thread instead of different threads for frontend and queue. (not recommended)| +|`FK_WITH_LOG_TIME`|If set, a timestamp will be appended to all log messages.| +|`FK_SLOW`|If set, all requests will be delayed by 3s. (not recommended, useful for testing)| +|`FK_LOG_LEVEL`|Sets the log level. Messages below the set log level will be suppressed. Available log levels are `quiet` (suppress all), `error`, `warning`, `success`, `info`, `debug`.| + +If the `NODE_ENV` environment variable is set to `testing`, then the flags `FK_DISABLE_CLUSTERING` and `FK_NO_DAEMONS` will always be set, and the log level will always be `quiet`. + ## Build FoundKey Build foundkey with the following: