mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
59 lines
No EOL
3.5 KiB
Text
59 lines
No EOL
3.5 KiB
Text
---
|
|
title: Configuration
|
|
sidebarTitle: Configuration
|
|
---
|
|
|
|
|
|
## Environment Variables
|
|
|
|
Sourcebot accepts a variety of environment variables to fine tune your deployment.
|
|
|
|
| Variable | Default | Description |
|
|
| :------- | :------ | :---------- |
|
|
| `SOURCEBOT_LOG_LEVEL` | `info` | <p>The Sourcebot logging level. Valid values are `debug`, `info`, `warn`, `error`, in order of severity.</p> |
|
|
| `DATABASE_URL` | `postgresql://postgres@ localhost:5432/sourcebot` | <p>Connection string of your Postgres database. By default, a Postgres database is automatically provisioned at startup within the container.</p><p>If you'd like to use a non-default schema, you can provide it as a parameter in the database url </p> |
|
|
| `REDIS_URL` | `redis://localhost:6379` | <p>Connection string of your Redis instance. By default, a Redis database is automatically provisioned at startup within the container.</p> |
|
|
| `SOURCEBOT_ENCRYPTION_KEY` | - | <p>Used to encrypt connection secrets. Generated using `openssl rand -base64 24`. Automatically generated at startup if no value is provided.</p> |
|
|
| `AUTH_SECRET` | - | <p>Used to validate login session cookies. Generated using `openssl rand -base64 33`. Automatically generated at startup if no value is provided.</p> |
|
|
| `AUTH_URL` | - | <p>URL of your Sourcebot deployment, e.g., `https://example.com` or `http://localhost:3000`. Required when `SOURCEBOT_AUTH_ENABLED` is `true`.</p> |
|
|
| `SOURCEBOT_TENANCY_MODE` | `single` | <p>The tenancy configuration for Sourcebot. Valid values are `single` or `multi`. See [this doc](/self-hosting/more/tenancy) for more info.</p> |
|
|
| `SOURCEBOT_AUTH_ENABLED` | `false` | <p>Enables/disables authentication in Sourcebot. If set to `false`, `SOURCEBOT_TENANCY_MODE` must be `single`. See [this doc](/self-hosting/more/authentication) for more info.</p> |
|
|
| `SOURCEBOT_TELEMETRY_DISABLED` | `false` | <p>Enables/disables telemetry collection in Sourcebot. See [this doc](/self-hosting/security/telemetry) for more info.</p> |
|
|
| `DATA_DIR` | `/data` | <p>The directory within the container to store all persistent data. Typically, this directory will be volume mapped such that data is persisted across container restarts (e.g., `docker run -v $(pwd):/data`)</p> |
|
|
| `DATA_CACHE_DIR` | `$DATA_DIR/.sourcebot` | <p>The root data directory in which all data written to disk by Sourcebot will be located.</p> |
|
|
| `DATABASE_DATA_DIR` | `$DATA_CACHE_DIR/db` | <p>The data directory for the default Postgres database.</p> |
|
|
| `REDIS_DATA_DIR` | `$DATA_CACHE_DIR/redis` | <p>The data directory for the default Redis instance.</p> |
|
|
|
|
|
|
## Additional Features
|
|
|
|
There are additional features that can be enabled and configured via environment variables.
|
|
|
|
<CardGroup cols={2}>
|
|
<Card horizontal title="Authentication" icon="lock" href="/self-hosting/more/authentication" />
|
|
<Card horizontal title="Tenancy" icon="users" href="/self-hosting/more/tenancy" />
|
|
<Card horizontal title="Transactional Emails" icon="envelope" href="/self-hosting/more/transactional-emails" />
|
|
<Card horizontal title="Declarative Configs" icon="page" href="/self-hosting/more/declarative-config" />
|
|
</CardGroup>
|
|
|
|
## Health Check and Version Endpoints
|
|
|
|
Sourcebot includes a health check endpoint that indicates if the application is alive, returning `200 OK` if it is:
|
|
|
|
```sh
|
|
curl http://localhost:3000/api/health
|
|
```
|
|
|
|
It also includes a version endpoint to check the current version of the application:
|
|
|
|
```sh
|
|
curl http://localhost:3000/api/version
|
|
```
|
|
|
|
Sample response:
|
|
|
|
```json
|
|
{
|
|
"version": "v3.0.0"
|
|
}
|
|
``` |