mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 05:18:32 +08:00
aa6058e9d1
* feat: initial version * fix: adjusted height * fix: tweaked sidebar styles again * fix: adjusted overflow property * fix: reverted overflow, cleaned sidebar
3.6 KiB
3.6 KiB
title, permalink
| title | permalink |
|---|---|
| Configuring Version 5 | /v5/configuration/ |
The following environment variables can be set to configure the Coral Server. You
can expose them in your shell via export NODE_ENV=development or by placing
the variables in a .env file in the root of the project in a simple
NODE_ENV=development format delimited by newlines.
NODE_ENV- Can be one ofproductionordevelopment. All production deployments should useproduction. Defaults toproductionwhen ran withnpm run startanddevelopmentwhen run withnpm run start:development.PORT- The port to listen for HTTP and Websocket requests. (Default3000)MONGODB_URI- The MongoDB database URI to connect to. (Defaultmongodb://127.0.0.1:27017/coral)REDIS_URI- The Redis database URI to connect to. (Defaultredis://127.0.0.1:6379)REDIS_OPTIONS- A JSON string with optional configuration options to be used when connecting to Redis as specified in the ioredis documentation. (Default:{})SIGNING_SECRET- The shared secret to use to sign JSON Web Tokens (JWT) with the selected signing algorithm. 🚨 Don't forget to set this variable! 🚨 (Default:keyboard cat)SIGNING_ALGORITHM- The signing algorithm to use for signing JWT's. (DefaultHS256).LOGGING_LEVEL- The logging level that can be set to one offatal,error,warn,info,debug, ortrace. (Defaultinfo)STATIC_URI- The URI that static assets can be accessed from. This URI can be to a proxy that uses this Coral server onPORTas the upstream. Disabled by default.DISABLE_TENANT_CACHING- Whentrue, all tenants will be loaded from the database when needed rather than keeping a in-memory copy in sync via published events on Redis. (Defaultfalse)DISABLE_MONGODB_AUTOINDEXING- Whentrue, Coral will not perform indexing operations when it starts up. This can be desired when you've already installed Coral on the target MongoDB, but want to improve start performance. You should not use this parameter unless you know what you're doing! Upgrades may introduce additional indexes that the application relies on. (Defaultfalse)LOCALE- Specify the default locale to use for all requests without a locale specified. (Defaulten-US)ENABLE_GRAPHIQL- Whentrue, it will enable the/graphiqleven in production, use with care. (Defaultfalse)CONCURRENCY- The number of worker nodes to spawn to handle web traffic, this should be tied to the number of CPU's available. (Defaultos.cpus().length)DEV_PORT- The port where the Webpack Development server is running on. (Default8080)METRICS_USERNAME- The username for Basic Authentication at the/metricsand/cluster_metricsendpoint.METRICS_PASSWORD- The password for Basic Authentication at the/metricsand/cluster_metricsendpoint.CLUSTER_METRICS_PORT- IfCONCURRENCYis more than1, the metrics are provided at this port under/cluster_metrics. (Default3001)DISABLE_LIVE_UPDATES- Whentrue, disables subscriptions for the comment stream for all stories across all tenants (Defaultfalse)WEBSOCKET_KEEP_ALIVE_TIMEOUT- A duration in a parsable format (e.g.30 seconds,1 minute) that should be used to send keep alive messages through the websocket to keep the socket alive (Default30 seconds)TRUST_PROXY- When provided, it configures the "trust proxy" settings for Express (See https://expressjs.com/en/guide/behind-proxies.html)