Migrated Developer Docs (#5683)
- Migrated developer docs to Twenty website - Modified User Guide and Docs layout to include sections and subsections **Section Example:** <img width="549" alt="Screenshot 2024-05-30 at 15 44 42" src="https://github.com/twentyhq/twenty/assets/102751374/41bd4037-4b76-48e6-bc79-48d3d6be9ab8"> **Subsection Example:** <img width="557" alt="Screenshot 2024-05-30 at 15 44 55" src="https://github.com/twentyhq/twenty/assets/102751374/f14c65a9-ab0c-4530-b624-5b20fc00511a"> - Created different components (Tabs, Tables, Editors etc.) for the mdx files **Tabs & Editor** <img width="665" alt="Screenshot 2024-05-30 at 15 47 39" src="https://github.com/twentyhq/twenty/assets/102751374/5166b5c7-b6cf-417d-9f29-b1f674c1c531"> **Tables** <img width="698" alt="Screenshot 2024-05-30 at 15 57 39" src="https://github.com/twentyhq/twenty/assets/102751374/2bbfe937-ec19-4004-ab00-f7a56e96db4a"> <img width="661" alt="Screenshot 2024-05-30 at 16 03 32" src="https://github.com/twentyhq/twenty/assets/102751374/ae95b47c-dd92-44f9-b535-ccdc953f71ff"> - Created a crawler for Twenty Developers (now that it will be on the twenty website). Once this PR is merged and the website is re-deployed, we need to start crawling and make sure the index name is ‘twenty-developer’ - Added a dropdown menu in the header to access User Guide and Developers + added Developers to footer https://github.com/twentyhq/twenty/assets/102751374/1bd1fbbd-1e65-4461-b18b-84d4ddbb8ea1 - Made new layout responsive Please fill in the information for each mdx file so that it can appear on its card, as well as in the ‘In this article’ section. Example with ‘Getting Started’ in the User Guide: <img width="786" alt="Screenshot 2024-05-30 at 16 29 39" src="https://github.com/twentyhq/twenty/assets/102751374/2714b01d-a664-4ddc-9291-528632ee12ea"> Example with info and sectionInfo filled in for 'Getting Started': <img width="620" alt="Screenshot 2024-05-30 at 16 33 57" src="https://github.com/twentyhq/twenty/assets/102751374/bc69e880-da6a-4b7e-bace-1effea866c11"> Please keep in mind that the images that are being used for Developers are the same as those found in User Guide and may not match the article. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@ -0,0 +1,436 @@
|
||||
---
|
||||
title: Vendor-Specific Instructions
|
||||
icon: TbCloud
|
||||
image: /images/user-guide/notes/notes_header.png
|
||||
---
|
||||
|
||||
<ArticleWarning>
|
||||
This document is maintained by the community. It might contain issues.
|
||||
Feel free to join our discord if you need assistance.
|
||||
</ArticleWarning>
|
||||
|
||||
|
||||
## Render
|
||||
|
||||
[](https://render.com/deploy?repo=https://github.com/twentyhq/twenty)
|
||||
|
||||
## RepoCloud
|
||||
|
||||
[](https://repocloud.io/details/?app_id=259)
|
||||
|
||||
|
||||
## Azure Container Apps
|
||||
|
||||
### About
|
||||
|
||||
Hosts Twenty CRM using Azure Container Apps.
|
||||
The solution provisions file shares, a container apps environment with three containers, and a log analytics workspace.
|
||||
|
||||
The file shares are used to store uploaded images and files through the UI, and to store database backups.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Terraform installed https://developer.hashicorp.com/terraform/install
|
||||
- An Azure subscription with permissions to create resources
|
||||
|
||||
### Step by step instructions:
|
||||
|
||||
1. Create a new folder and copy all the files from below
|
||||
2. Run `terraform init`
|
||||
3. Run `terraform plan -out tfplan`
|
||||
4. Run `terraform apply tfplan`
|
||||
5. Connect to server `az containerapp exec --name twenty-server -g twenty-crm-rg`
|
||||
6. Initialize the database from the server `yarn database:init:prod`
|
||||
7. Go to https://your-twenty-front-fqdn - located in the portal
|
||||
|
||||
#### Production docker containers
|
||||
|
||||
This uses the prebuilt images found on [docker hub](https://hub.docker.com/r/twentycrm/).
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
- Is set in respective tf-files
|
||||
- See docs [Setup Environment Variables](https://docs.twenty.com/start/self-hosting/) for usage
|
||||
- After deployment you could can set `IS_SIGN_UP_DISABLED=true` (and run `terraform plan/apply` again) to disable new workspaces from being created
|
||||
|
||||
#### Security and networking
|
||||
|
||||
- Container `twenty-db` accepts only ingress TCP traffic from other containers in the environment. No external ingress traffic allowed
|
||||
- Container `twenty-server` accepts external traffic over HTTPS
|
||||
- Container `twenty-front` accepts external traffic over HTTPS
|
||||
|
||||
It´s highly recommended to enable [built-in authentication](https://learn.microsoft.com/en-us/azure/container-apps/authentication) for `twenty-front` using one of the supported providers.
|
||||
|
||||
Use the [custom domain](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates) feature on the `twenty-front` container if you would like an easier domain name.
|
||||
|
||||
#### Files
|
||||
|
||||
##### providers.tf
|
||||
|
||||
```hcl
|
||||
# providers.tf
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
azapi = {
|
||||
source = "Azure/azapi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "azapi" {
|
||||
}
|
||||
|
||||
provider "azurerm" {
|
||||
features {}
|
||||
}
|
||||
|
||||
provider "azuread" {
|
||||
}
|
||||
|
||||
provider "random" {
|
||||
}
|
||||
```
|
||||
|
||||
##### main.tf
|
||||
|
||||
```hcl
|
||||
# main.tf
|
||||
|
||||
# Create a resource group
|
||||
resource "azurerm_resource_group" "main" {
|
||||
name = "twenty-crm-rg"
|
||||
location = "North Europe"
|
||||
}
|
||||
|
||||
# Variables
|
||||
locals {
|
||||
app_env_name = "twenty"
|
||||
|
||||
server_name = "twenty-server"
|
||||
server_tag = "latest"
|
||||
|
||||
front_app_name = "twenty-front"
|
||||
front_tag = "latest"
|
||||
|
||||
db_app_name = "twenty-postgres"
|
||||
db_tag = "latest"
|
||||
|
||||
db_user = "twenty"
|
||||
db_password = "twenty"
|
||||
|
||||
storage_mount_db_name = "twentydbstoragemount"
|
||||
storage_mount_server_name = "twentyserverstoragemount"
|
||||
|
||||
cpu = 1.0
|
||||
memory = "2Gi"
|
||||
}
|
||||
|
||||
# Set up a Log Analytics workspace
|
||||
resource "azurerm_log_analytics_workspace" "main" {
|
||||
name = "${local.app_env_name}-law"
|
||||
location = azurerm_resource_group.main.location
|
||||
resource_group_name = azurerm_resource_group.main.name
|
||||
sku = "PerGB2018"
|
||||
retention_in_days = 30
|
||||
}
|
||||
|
||||
# Create a storage account
|
||||
resource "random_pet" "example" {
|
||||
length = 2
|
||||
separator = ""
|
||||
}
|
||||
|
||||
resource "azurerm_storage_account" "main" {
|
||||
name = "twentystorage${random_pet.example.id}"
|
||||
resource_group_name = azurerm_resource_group.main.name
|
||||
location = azurerm_resource_group.main.location
|
||||
account_tier = "Standard"
|
||||
account_replication_type = "LRS"
|
||||
large_file_share_enabled = true
|
||||
}
|
||||
|
||||
# Create db file storage
|
||||
resource "azurerm_storage_share" "db" {
|
||||
name = "twentydatabaseshare"
|
||||
storage_account_name = azurerm_storage_account.main.name
|
||||
quota = 50
|
||||
enabled_protocol = "SMB"
|
||||
}
|
||||
|
||||
# Create backend file storage
|
||||
resource "azurerm_storage_share" "server" {
|
||||
name = "twentyservershare"
|
||||
storage_account_name = azurerm_storage_account.main.name
|
||||
quota = 50
|
||||
enabled_protocol = "SMB"
|
||||
}
|
||||
|
||||
# Create a Container App Environment
|
||||
resource "azurerm_container_app_environment" "main" {
|
||||
name = "${local.app_env_name}-env"
|
||||
location = azurerm_resource_group.main.location
|
||||
resource_group_name = azurerm_resource_group.main.name
|
||||
log_analytics_workspace_id = azurerm_log_analytics_workspace.main.id
|
||||
}
|
||||
|
||||
# Connect the db storage share to the container app environment
|
||||
resource "azurerm_container_app_environment_storage" "db" {
|
||||
name = local.storage_mount_db_name
|
||||
container_app_environment_id = azurerm_container_app_environment.main.id
|
||||
account_name = azurerm_storage_account.main.name
|
||||
share_name = azurerm_storage_share.db.name
|
||||
access_key = azurerm_storage_account.main.primary_access_key
|
||||
access_mode = "ReadWrite"
|
||||
}
|
||||
|
||||
# Connect the server storage share to the container app environment
|
||||
resource "azurerm_container_app_environment_storage" "server" {
|
||||
name = local.storage_mount_server_name
|
||||
container_app_environment_id = azurerm_container_app_environment.main.id
|
||||
account_name = azurerm_storage_account.main.name
|
||||
share_name = azurerm_storage_share.server.name
|
||||
access_key = azurerm_storage_account.main.primary_access_key
|
||||
access_mode = "ReadWrite"
|
||||
}
|
||||
```
|
||||
|
||||
##### frontend.tf
|
||||
|
||||
```hcl
|
||||
# frontend.tf
|
||||
|
||||
resource "azurerm_container_app" "twenty_front" {
|
||||
name = local.front_app_name
|
||||
container_app_environment_id = azurerm_container_app_environment.main.id
|
||||
resource_group_name = azurerm_resource_group.main.name
|
||||
revision_mode = "Single"
|
||||
|
||||
depends_on = [azurerm_container_app.twenty_server]
|
||||
|
||||
ingress {
|
||||
allow_insecure_connections = false
|
||||
external_enabled = true
|
||||
target_port = 3000
|
||||
transport = "http"
|
||||
traffic_weight {
|
||||
percentage = 100
|
||||
latest_revision = true
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
min_replicas = 1
|
||||
# things starts to fail when using more than 1 replica
|
||||
max_replicas = 1
|
||||
container {
|
||||
name = "twenty-front"
|
||||
image = "docker.io/twentycrm/twenty-front:${local.front_tag}"
|
||||
cpu = local.cpu
|
||||
memory = local.memory
|
||||
|
||||
env {
|
||||
name = "REACT_APP_SERVER_BASE_URL"
|
||||
value = "https://${azurerm_container_app.twenty_server.ingress[0].fqdn}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Set CORS rules for frontend app using AzAPI
|
||||
resource "azapi_update_resource" "cors" {
|
||||
type = "Microsoft.App/containerApps@2023-05-01"
|
||||
resource_id = azurerm_container_app.twenty_front.id
|
||||
body = jsonencode({
|
||||
properties = {
|
||||
configuration = {
|
||||
ingress = {
|
||||
corsPolicy = {
|
||||
allowedOrigins = ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
depends_on = [azurerm_container_app.twenty_front]
|
||||
}
|
||||
```
|
||||
|
||||
##### backend.tf
|
||||
|
||||
```hcl
|
||||
# backend.tf
|
||||
|
||||
# Create three random UUIDs
|
||||
resource "random_uuid" "access_token_secret" {}
|
||||
resource "random_uuid" "login_token_secret" {}
|
||||
resource "random_uuid" "refresh_token_secret" {}
|
||||
resource "random_uuid" "file_token_secret" {}
|
||||
|
||||
resource "azurerm_container_app" "twenty_server" {
|
||||
name = local.server_name
|
||||
container_app_environment_id = azurerm_container_app_environment.main.id
|
||||
resource_group_name = azurerm_resource_group.main.name
|
||||
revision_mode = "Single"
|
||||
|
||||
depends_on = [azurerm_container_app.twenty_db, azurerm_container_app_environment_storage.server]
|
||||
|
||||
ingress {
|
||||
allow_insecure_connections = false
|
||||
external_enabled = true
|
||||
target_port = 3000
|
||||
transport = "http"
|
||||
traffic_weight {
|
||||
percentage = 100
|
||||
latest_revision = true
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
min_replicas = 1
|
||||
max_replicas = 1
|
||||
volume {
|
||||
name = "twenty-server-data"
|
||||
storage_type = "AzureFile"
|
||||
storage_name = local.storage_mount_server_name
|
||||
}
|
||||
|
||||
container {
|
||||
name = local.server_name
|
||||
image = "docker.io/twentycrm/twenty-server:${local.server_tag}"
|
||||
cpu = local.cpu
|
||||
memory = local.memory
|
||||
|
||||
volume_mounts {
|
||||
name = "twenty-server-data"
|
||||
path = "/app/packages/twenty-server/.local-storage"
|
||||
}
|
||||
|
||||
# Environment variables
|
||||
env {
|
||||
name = "IS_SIGN_UP_DISABLED"
|
||||
value = false
|
||||
}
|
||||
env {
|
||||
name = "SIGN_IN_PREFILLED"
|
||||
value = false
|
||||
}
|
||||
env {
|
||||
name = "STORAGE_TYPE"
|
||||
value = "local"
|
||||
}
|
||||
env {
|
||||
name = "STORAGE_LOCAL_PATH"
|
||||
value = ".local-storage"
|
||||
}
|
||||
env {
|
||||
name = "PG_DATABASE_URL"
|
||||
value = "postgres://${local.db_user}:${local.db_password}@${local.db_app_name}:5432/default"
|
||||
}
|
||||
env {
|
||||
name = "FRONT_BASE_URL"
|
||||
value = "https://${local.front_app_name}"
|
||||
}
|
||||
env {
|
||||
name = "ACCESS_TOKEN_SECRET"
|
||||
value = random_uuid.access_token_secret.result
|
||||
}
|
||||
env {
|
||||
name = "LOGIN_TOKEN_SECRET"
|
||||
value = random_uuid.login_token_secret.result
|
||||
}
|
||||
env {
|
||||
name = "REFRESH_TOKEN_SECRET"
|
||||
value = random_uuid.refresh_token_secret.result
|
||||
}
|
||||
env {
|
||||
name = "FILE_TOKEN_SECRET"
|
||||
value = random_uuid.file_token_secret.result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Set CORS rules for server app using AzAPI
|
||||
resource "azapi_update_resource" "server_cors" {
|
||||
type = "Microsoft.App/containerApps@2023-05-01"
|
||||
resource_id = azurerm_container_app.twenty_server.id
|
||||
body = jsonencode({
|
||||
properties = {
|
||||
configuration = {
|
||||
ingress = {
|
||||
corsPolicy = {
|
||||
allowedOrigins = ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
depends_on = [azurerm_container_app.twenty_server]
|
||||
}
|
||||
```
|
||||
|
||||
##### database.tf
|
||||
|
||||
```hcl
|
||||
# database.tf
|
||||
|
||||
resource "azurerm_container_app" "twenty_db" {
|
||||
name = local.db_app_name
|
||||
container_app_environment_id = azurerm_container_app_environment.main.id
|
||||
resource_group_name = azurerm_resource_group.main.name
|
||||
revision_mode = "Single"
|
||||
|
||||
depends_on = [azurerm_container_app_environment_storage.db]
|
||||
|
||||
ingress {
|
||||
allow_insecure_connections = false
|
||||
external_enabled = false
|
||||
target_port = 5432
|
||||
transport = "tcp"
|
||||
traffic_weight {
|
||||
percentage = 100
|
||||
latest_revision = true
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
min_replicas = 1
|
||||
max_replicas = 1
|
||||
container {
|
||||
name = local.db_app_name
|
||||
image = "docker.io/twentycrm/twenty-postgres:${local.db_tag}"
|
||||
cpu = local.cpu
|
||||
memory = local.memory
|
||||
|
||||
volume_mounts {
|
||||
name = "twenty-db-data"
|
||||
path = "/var/lib/postgresql/data"
|
||||
}
|
||||
|
||||
env {
|
||||
name = "POSTGRES_USER"
|
||||
value = "postgres"
|
||||
}
|
||||
env {
|
||||
name = "POSTGRES_PASSWORD"
|
||||
value = "postgres"
|
||||
}
|
||||
env {
|
||||
name = "POSTGRES_DB"
|
||||
value = "default"
|
||||
}
|
||||
}
|
||||
|
||||
volume {
|
||||
name = "twenty-db-data"
|
||||
storage_type = "AzureFile"
|
||||
storage_name = local.storage_mount_db_name
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Others
|
||||
|
||||
Please feel free to Open a PR to add more Cloud Provider options.
|
||||
@ -0,0 +1,52 @@
|
||||
---
|
||||
title: 1-Click Docker Compose
|
||||
icon: TbBrandDocker
|
||||
image: /images/user-guide/objects/objects.png
|
||||
---
|
||||
|
||||
## Option 1: One-line script
|
||||
|
||||
Install the project with the command below.
|
||||
It will install the latest stable version.
|
||||
```bash
|
||||
bash <(curl -sL https://git.new/20)
|
||||
```
|
||||
|
||||
If you want to install a specific version, you can do so by adding the version number. `VERSION=x.y.z BRANCH=branch-name bash <(curl -sL https://git.new/20)`
|
||||
|
||||
## Option 2: Manual steps
|
||||
|
||||
1. Copy the [.env.example](https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/.env.example) into a `.env` in the same directory where your `docker-compose.yml` file will be
|
||||
2. Run the command `openssl rand -base64 32` four times, make note of the string for each
|
||||
3. In your .env file, replace the three "replace_me_with_a_random_string_access" with the four random strings you just generated.
|
||||
|
||||
```
|
||||
ACCESS_TOKEN_SECRET=replace_me_with_a_random_string_access
|
||||
LOGIN_TOKEN_SECRET=replace_me_with_a_random_string_login
|
||||
REFRESH_TOKEN_SECRET=replace_me_with_a_random_string_refresh
|
||||
FILE_TOKEN_SECRET=replace_me_with_a_random_string_refresh
|
||||
```
|
||||
|
||||
4. Copy the [docker-compose.yml](https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/docker-compose.yml) in the same directory as your `.env` file.
|
||||
5. Run the command `docker-compose up -d`
|
||||
6. Go to http://localhost:3000 and see your docker instance.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
#### Not able to login
|
||||
|
||||
If you encounter errors, (not able to log into the application after inputting an email) after the inital setup, try running the following commands and see if that solves your issue.
|
||||
```
|
||||
docker exec -it twenty-server-1 yarn
|
||||
docker exec -it twenty-server-1 npx nx database:reset
|
||||
```
|
||||
|
||||
#### Cannot connect to server, running behind a reverse proxy
|
||||
|
||||
Complete step three and four with:
|
||||
|
||||
3. Update `SERVER_URL=https://<your-api-url.com>` in your `.env`
|
||||
|
||||
#### Persistence
|
||||
|
||||
By default the docker-compose will create volumes for the Database and local storage of the Server. Note that the containers will not persist data if your server is not configured to be stateful (for example Heroku). You probably want to configure a special stateful resource for this purpose.
|
||||
@ -0,0 +1,200 @@
|
||||
---
|
||||
title: Environment Variables
|
||||
icon: TbServer
|
||||
image: /images/user-guide/table-views/table.png
|
||||
---
|
||||
|
||||
import OptionTable from '@site/src/theme/OptionTable'
|
||||
|
||||
# Setup Environment Variables
|
||||
|
||||
## Frontend
|
||||
|
||||
<ArticleTable options={[
|
||||
['REACT_APP_SERVER_BASE_URL', 'http://localhost:3000', 'Url of backend server'],
|
||||
['GENERATE_SOURCEMAP', 'false', 'Generate source maps for debugging'],
|
||||
['CHROMATIC_PROJECT_TOKEN', '', 'Chromatic token used for CI'],
|
||||
]}></ArticleTable>
|
||||
|
||||
|
||||
## Backend
|
||||
|
||||
### Config
|
||||
|
||||
<ArticleTable options={[
|
||||
['PG_DATABASE_URL', 'postgres://user:pw@localhost:5432/default?connection_limit=1', 'Database connection'],
|
||||
['PG_SSL_ALLOW_SELF_SIGNED', 'false', 'Allow self signed certificates'],
|
||||
['REDIS_HOST', '127.0.0.1', 'Redis connection host'],
|
||||
['REDIS_PORT', '6379', 'Redis connection port'],
|
||||
['FRONT_BASE_URL', 'http://localhost:3001', 'Url to the hosted frontend'],
|
||||
['SERVER_URL', 'http://localhost:3000', 'Url to the hosted server'],
|
||||
['PORT', '3000', 'Port'],
|
||||
['CACHE_STORAGE_TYPE', 'memory', 'Cache type (memory, redis...)'],
|
||||
['CACHE_STORAGE_TTL', '3600 * 24 * 7', 'Cache TTL in seconds']
|
||||
]}></ArticleTable>
|
||||
|
||||
### Security
|
||||
|
||||
<ArticleTable options={[
|
||||
['API_RATE_LIMITING_TTL', '100', 'API rate limiting time window'],
|
||||
['API_RATE_LIMITING_LIMIT', '200', 'API rate limiting max requests'],
|
||||
]}></ArticleTable>
|
||||
### Tokens
|
||||
|
||||
<ArticleTable options={[
|
||||
['ACCESS_TOKEN_SECRET', '<random>', 'Secret used for the access tokens'],
|
||||
['ACCESS_TOKEN_EXPIRES_IN', '30m', 'Access token expiration time'],
|
||||
['LOGIN_TOKEN_SECRET', '<random>', 'Secret used for the login tokens'],
|
||||
['LOGIN_TOKEN_EXPIRES_IN', '15m', 'Login token expiration time'],
|
||||
['REFRESH_TOKEN_SECRET', '<random>', 'Secret used for the refresh tokens'],
|
||||
['REFRESH_TOKEN_EXPIRES_IN', '90d', 'Refresh token expiration time'],
|
||||
['REFRESH_TOKEN_COOL_DOWN', '1m', 'Refresh token cooldown'],
|
||||
['FILE_TOKEN_SECRET', '<random>', 'Secret used for the file tokens'],
|
||||
['FILE_TOKEN_EXPIRES_IN', '1d', 'File token expiration time'],
|
||||
['API_TOKEN_EXPIRES_IN', '1000y', 'Api token expiration time'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Auth
|
||||
|
||||
<ArticleTable options={[
|
||||
['MESSAGING_PROVIDER_GMAIL_ENABLED', 'false', 'Enable Gmail API connection'],
|
||||
['CALENDAR_PROVIDER_GOOGLE_ENABLED', 'false', 'Enable Google Calendar API connection'],
|
||||
['AUTH_GOOGLE_APIS_CALLBACK_URL', '', 'Google APIs auth callback'],
|
||||
['AUTH_PASSWORD_ENABLED', 'false', 'Enable Email/Password login'],
|
||||
['AUTH_GOOGLE_ENABLED', 'false', 'Enable Google SSO login'],
|
||||
['AUTH_GOOGLE_CLIENT_ID', '', 'Google client ID'],
|
||||
['AUTH_GOOGLE_CLIENT_SECRET', '', 'Google client secret'],
|
||||
['AUTH_GOOGLE_CALLBACK_URL', '', 'Google auth callback'],
|
||||
['AUTH_MICROSOFT_ENABLED', 'false', 'Enable Microsoft SSO login'],
|
||||
['AUTH_MICROSOFT_CLIENT_ID', '', 'Microsoft client ID'],
|
||||
['AUTH_MICROSOFT_TENANT_ID', '', 'Microsoft tenant ID'],
|
||||
['AUTH_MICROSOFT_CLIENT_SECRET', '', 'Microsoft client secret'],
|
||||
['AUTH_MICROSOFT_CALLBACK_URL', '', 'Microsoft auth callback'],
|
||||
['FRONT_AUTH_CALLBACK_URL', 'http://localhost:3001/verify ', 'Callback used for Login page'],
|
||||
['IS_SIGN_UP_DISABLED', 'false', 'Disable sign-up'],
|
||||
['PASSWORD_RESET_TOKEN_EXPIRES_IN', '5m', 'Password reset token expiration time'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Email
|
||||
|
||||
<ArticleTable options={[
|
||||
['EMAIL_FROM_ADDRESS', 'contact@yourdomain.com', 'Global email From: header used to send emails'],
|
||||
['EMAIL_FROM_NAME', 'John from YourDomain', 'Global name From: header used to send emails'],
|
||||
['EMAIL_SYSTEM_ADDRESS', 'system@yourdomain.com', 'Email address used as a destination to send internal system notification'],
|
||||
['EMAIL_DRIVER', 'logger', "Email driver: 'logger' (to log emails in console) or 'smtp'"],
|
||||
['EMAIL_SMTP_HOST', '', 'Email Smtp Host'],
|
||||
['EMAIL_SMTP_PORT', '', 'Email Smtp Port'],
|
||||
['EMAIL_SMTP_USER', '', 'Email Smtp User'],
|
||||
['EMAIL_SMTP_PASSWORD', '', 'Email Smtp Password'],
|
||||
]}></ArticleTable>
|
||||
|
||||
#### Email SMTP Server configuration examples
|
||||
|
||||
<ArticleTabs label1="Gmail" label2="Office365" label3="Smtp4dev">
|
||||
|
||||
<ArticleTab>
|
||||
|
||||
You will need to provision an [App Password](https://support.google.com/accounts/answer/185833).
|
||||
- EMAIL_SMTP_HOST=smtp.gmail.com
|
||||
- EMAIL_SERVER_PORT=465
|
||||
- EMAIL_SERVER_USER=gmail_email_address
|
||||
- EMAIL_SERVER_PASSWORD='gmail_app_password'
|
||||
|
||||
</ArticleTab>
|
||||
|
||||
<ArticleTab>
|
||||
|
||||
Keep in mind that if you have 2FA enabled, you will need to provision an [App Password](https://support.microsoft.com/en-us/account-billing/manage-app-passwords-for-two-step-verification-d6dc8c6d-4bf7-4851-ad95-6d07799387e9).
|
||||
- EMAIL_SMTP_HOST=smtp.office365.com
|
||||
- EMAIL_SERVER_PORT=587
|
||||
- EMAIL_SERVER_USER=office365_email_address
|
||||
- EMAIL_SERVER_PASSWORD='office365_password'
|
||||
|
||||
</ArticleTab>
|
||||
|
||||
<ArticleTab>
|
||||
|
||||
**smtp4dev** is a fake SMTP email server for development and testing.
|
||||
- Run the smtp4dev image: `docker run --rm -it -p 8090:80 -p 2525:25 rnwood/smtp4dev`
|
||||
- Access the smtp4dev ui here: [http://localhost:8090](http://localhost:8090)
|
||||
- Set the following env variables:
|
||||
- EMAIL_SERVER_HOST=localhost
|
||||
- EMAIL_SERVER_PORT=2525
|
||||
|
||||
</ArticleTab>
|
||||
|
||||
</ArticleTabs>
|
||||
|
||||
### Storage
|
||||
|
||||
<ArticleTable options={[
|
||||
['STORAGE_TYPE', 'local', "Storage driver: 'local' or 's3'"],
|
||||
['STORAGE_S3_REGION', '', 'Storage Region'],
|
||||
['STORAGE_S3_NAME', '', 'Bucket Name'],
|
||||
['STORAGE_S3_ENDPOINT', '', 'Use if a different Endpoint is needed (for example Google)'],
|
||||
['STORAGE_LOCAL_PATH', '.local-storage', 'data path (local storage)'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Message Queue
|
||||
|
||||
<ArticleTable options={[
|
||||
['MESSAGE_QUEUE_TYPE', 'pg-boss', "Queue driver: 'pg-boss' or 'bull-mq'"],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Logging
|
||||
|
||||
<ArticleTable options={[
|
||||
['LOGGER_DRIVER', 'console', "The logging driver can be: 'console' or 'sentry'"],
|
||||
['LOGGER_IS_BUFFER_ENABLED', 'true', 'Buffer the logs before sending them to the logging driver'],
|
||||
['LOG_LEVELS', 'error,warn', "The loglevels which are logged to the logging driver. Can include: 'log', 'warn', 'error'"],
|
||||
['EXCEPTION_HANDLER_DRIVER', 'sentry', "The exception handler driver can be: 'console' or 'sentry'"],
|
||||
['SENTRY_ENVIRONMENT', 'main', 'The sentry environment used if sentry logging driver is selected'],
|
||||
['SENTRY_RELEASE', 'latest', 'The sentry release used if sentry logging driver is selected'],
|
||||
['SENTRY_DSN', 'https://xxx@xxx.ingest.sentry.io/xxx', 'The sentry logging endpoint used if sentry logging driver is selected'],
|
||||
['SENTRY_FRONT_DSN', 'https://xxx@xxx.ingest.sentry.io/xxx', 'The sentry logging endpoint used by the frontend if sentry logging driver is selected'],
|
||||
]}></ArticleTable>
|
||||
|
||||
|
||||
### Data enrichment and AI
|
||||
|
||||
<ArticleTable options={[
|
||||
['OPENROUTER_API_KEY', '', "The API key for openrouter.ai, an abstraction layer over models from Mistral, OpenAI and more"]
|
||||
]}></ArticleTable>
|
||||
|
||||
|
||||
### Support Chat
|
||||
|
||||
<ArticleTable options={[
|
||||
['SUPPORT_DRIVER', 'front', "Support driver ('front' or 'none')"],
|
||||
['SUPPORT_FRONT_HMAC_KEY', '<secret>', 'Suport chat key'],
|
||||
['SUPPORT_FRONT_CHAT_ID', '<id>', 'Support chat id'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Telemetry
|
||||
|
||||
<ArticleTable options={[
|
||||
['TELEMETRY_ENABLED', 'true', 'Change this if you want to disable telemetry'],
|
||||
['TELEMETRY_ANONYMIZATION_ENABLED', 'true', 'Telemetry is anonymized by default, you probably don\'t want to change this'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Debug / Development
|
||||
|
||||
<ArticleTable options={[
|
||||
['DEBUG_MODE', 'true', 'Activate debug mode'],
|
||||
['SIGN_IN_PREFILLED', 'true', 'Prefill the Signin form for usage in a demo or dev environment'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Workspace Cleaning
|
||||
|
||||
<ArticleTable options={[
|
||||
['WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION', '', 'Number of inactive days before sending workspace deleting warning email'],
|
||||
['WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION', '', 'Number of inactive days before deleting workspace'],
|
||||
]}></ArticleTable>
|
||||
|
||||
### Captcha
|
||||
|
||||
<ArticleTable options={[
|
||||
['CAPTCHA_DRIVER', '', "The captcha driver can be 'google-recaptcha' or 'turnstile'"],
|
||||
['CAPTCHA_SITE_KEY', '', 'The captcha site key'],
|
||||
['CAPTCHA_SECRET_KEY', '', 'The captcha secret key'],
|
||||
]}></ArticleTable>
|
||||
Reference in New Issue
Block a user