@@ -8,86 +8,92 @@ Tianji supports various environment variables to customize its behavior. You can
88
99## Basic Configuration
1010
11- | Variable | Description | Default | Example |
12- | --- | --- | --- | --- |
13- | ` PORT ` | Server port | ` 12345 ` | ` 3000 ` |
14- | ` JWT_SECRET ` | Secret for JWT tokens | Random Text | ` your-secret-key ` |
15- | ` ALLOW_REGISTER ` | Enable user registration | ` false ` | ` true ` |
16- | ` ALLOW_OPENAPI ` | Enable OpenAPI access | ` true ` | ` false ` |
17- | ` WEBSITE_ID ` | Website identifier | - | ` your-website-id ` |
18- | ` DISABLE_AUTO_CLEAR ` | Disable automatic data cleanup | ` false ` | ` true ` |
19- | ` DISABLE_ACCESS_LOGS ` | Disable access logs | ` false ` | ` true ` |
20- | ` DB_DEBUG ` | Enable database debugging | ` false ` | ` true ` |
11+ | Variable | Description | Default | Example |
12+ | --------------------- | ------------------------------ | ----------- | -------------- --- |
13+ | ` PORT ` | Server port | ` 12345 ` | ` 3000 ` |
14+ | ` JWT_SECRET ` | Secret for JWT tokens | Random Text | ` your-secret-key ` |
15+ | ` ALLOW_REGISTER ` | Enable user registration | ` false ` | ` true ` |
16+ | ` ALLOW_OPENAPI ` | Enable OpenAPI access | ` true ` | ` false ` |
17+ | ` WEBSITE_ID ` | Website identifier | - | ` your-website-id ` |
18+ | ` DISABLE_AUTO_CLEAR ` | Disable automatic data cleanup | ` false ` | ` true ` |
19+ | ` DISABLE_ACCESS_LOGS ` | Disable access logs | ` false ` | ` true ` |
20+ | ` DB_DEBUG ` | Enable database debugging | ` false ` | ` true ` |
2121
2222## Authentication
2323
24- | Variable | Description | Default | Example |
25- | --- | --- | --- | --- |
26- | ` DISABLE_ACCOUNT ` | Disable account-based authentication | ` false ` | ` true ` |
27- | ` AUTH_SECRET ` | Authentication secret | MD5 of JWT secret | ` your-auth-secret ` |
28- | ` AUTH_RESTRICT_EMAIL ` | Restrict registration to specific email domains | - | ` @example.com ` |
24+ | Variable | Description | Default | Example |
25+ | --------------------- | ----------------------------------------------- | ----------------- | --------------- --- |
26+ | ` DISABLE_ACCOUNT ` | Disable account-based authentication | ` false ` | ` true ` |
27+ | ` AUTH_SECRET ` | Authentication secret | MD5 of JWT secret | ` your-auth-secret ` |
28+ | ` AUTH_RESTRICT_EMAIL ` | Restrict registration to specific email domains | - | ` @example.com ` |
2929
3030### Email Authentication and Email Invitation
3131
32- | Variable | Description | Default | Example |
33- | --- | --- | --- | --- |
34- | ` EMAIL_SERVER ` | SMTP server for email | - | ` smtp://user:pass@smtp.example.com:587 ` |
35- | ` EMAIL_FROM ` | Email sender address | - | ` noreply@example.com ` |
32+ | Variable | Description | Default | Example |
33+ | -------------- | --------------------- | ------- | ------------------------------------ --- |
34+ | ` EMAIL_SERVER ` | SMTP server for email | - | ` smtp://user:pass@smtp.example.com:587 ` |
35+ | ` EMAIL_FROM ` | Email sender address | - | ` noreply@example.com ` |
3636
3737### GitHub Authentication
3838
39- | Variable | Description | Default | Example |
40- | --- | --- | --- | --- |
41- | ` AUTH_GITHUB_ID ` | GitHub OAuth client ID | - | ` your-github-client-id ` |
42- | ` AUTH_GITHUB_SECRET ` | GitHub OAuth client secret | - | ` your-github-client-secret ` |
39+ | Variable | Description | Default | Example |
40+ | -------------------- | -------------------------- | ------- | ------------------------ --- |
41+ | ` AUTH_GITHUB_ID ` | GitHub OAuth client ID | - | ` your-github-client-id ` |
42+ | ` AUTH_GITHUB_SECRET ` | GitHub OAuth client secret | - | ` your-github-client-secret ` |
4343
4444### Google Authentication
4545
46- | Variable | Description | Default | Example |
47- | --- | --- | --- | --- |
48- | ` AUTH_GOOGLE_ID ` | Google OAuth client ID | - | ` your-google-client-id ` |
49- | ` AUTH_GOOGLE_SECRET ` | Google OAuth client secret | - | ` your-google-client-secret ` |
46+ | Variable | Description | Default | Example |
47+ | -------------------- | -------------------------- | ------- | ------------------------ --- |
48+ | ` AUTH_GOOGLE_ID ` | Google OAuth client ID | - | ` your-google-client-id ` |
49+ | ` AUTH_GOOGLE_SECRET ` | Google OAuth client secret | - | ` your-google-client-secret ` |
5050
5151### Custom OAuth/OIDC Authentication
5252
53- | Variable | Description | Default | Example |
54- | --- | --- | --- | --- |
55- | ` AUTH_CUSTOM_ID ` | Custom OAuth/OIDC client ID | - | ` your-custom-client-id ` |
56- | ` AUTH_CUSTOM_SECRET ` | Custom OAuth/OIDC client secret | - | ` your-custom-client-secret ` |
57- | ` AUTH_CUSTOM_NAME ` | Custom provider name | ` Custom ` | ` Enterprise SSO ` |
58- | ` AUTH_CUSTOM_TYPE ` | Authentication type | ` oidc ` | ` oauth ` |
59- | ` AUTH_CUSTOM_ISSUER ` | OIDC issuer URL | - | ` https://auth.example.com ` |
53+ | Variable | Description | Default | Example |
54+ | -------------------- | ------------------------------- | -------- | ------------------------ --- |
55+ | ` AUTH_CUSTOM_ID ` | Custom OAuth/OIDC client ID | - | ` your-custom-client-id ` |
56+ | ` AUTH_CUSTOM_SECRET ` | Custom OAuth/OIDC client secret | - | ` your-custom-client-secret ` |
57+ | ` AUTH_CUSTOM_NAME ` | Custom provider name | ` Custom ` | ` Enterprise SSO ` |
58+ | ` AUTH_CUSTOM_TYPE ` | Authentication type | ` oidc ` | ` oauth ` |
59+ | ` AUTH_CUSTOM_ISSUER ` | OIDC issuer URL | - | ` https://auth.example.com ` |
6060
6161## AI Features
6262
63- | Variable | Description | Default | Example |
64- | --- | --- | --- | --- |
65- | ` SHARED_OPENAI_API_KEY ` | OpenAI API key | - | ` your-openai-api-key ` |
66- | ` SHARED_OPENAI_BASE_URL ` | Custom OpenAI API URL | - | ` https://api.openai.com/v1 ` |
67- | ` SHARED_OPENAI_MODEL_NAME ` | OpenAI model to use | ` gpt-4o ` | ` gpt-3.5-turbo ` |
68- | ` DEBUG_AI_FEATURE ` | Debug AI features | ` false ` | ` true ` |
63+ | Variable | Description | Default | Example |
64+ | -------------------------- | --------------------- | -------- | ------------------------ --- |
65+ | ` SHARED_OPENAI_API_KEY ` | OpenAI API key | - | ` your-openai-api-key ` |
66+ | ` SHARED_OPENAI_BASE_URL ` | Custom OpenAI API URL | - | ` https://api.openai.com/v1 ` |
67+ | ` SHARED_OPENAI_MODEL_NAME ` | OpenAI model to use | ` gpt-4o ` | ` gpt-3.5-turbo ` |
68+ | ` DEBUG_AI_FEATURE ` | Debug AI features | ` false ` | ` true ` |
6969
7070## Sandbox Configuration
7171
72- | Variable | Description | Default | Example |
73- | --- | --- | --- | --- |
74- | ` USE_VM2 ` | Use VM2 for sandbox execution | ` false ` | ` true ` |
75- | ` SANDBOX_MEMORY_LIMIT ` | Memory limit for sandbox (MB) | ` 16 ` | ` 32 ` |
76- | ` PUPPETEER_EXECUTABLE_PATH ` | Custom path to Puppeteer executable | - | ` /usr/bin/chromium ` |
72+ | Variable | Description | Default | Example |
73+ | --------------------------- | ----------------------------------- | ------- | ---------------- --- |
74+ | ` USE_VM2 ` | Use VM2 for sandbox execution | ` false ` | ` true ` |
75+ | ` SANDBOX_MEMORY_LIMIT ` | Memory limit for sandbox (MB) | ` 16 ` | ` 32 ` |
76+ | ` PUPPETEER_EXECUTABLE_PATH ` | Custom path to Puppeteer executable | - | ` /usr/bin/chromium ` |
7777
7878## Maps Integration
7979
80- | Variable | Description | Default | Example |
81- | --- | --- | --- | --- |
82- | ` AMAP_TOKEN ` | AMap (Gaode) API token | - | ` your-amap-token ` |
83- | ` MAPBOX_TOKEN ` | Mapbox API token | - | ` your-mapbox-token ` |
80+ | Variable | Description | Default | Example |
81+ | -------------- | ---------------------- | ------- | ---------------- --- |
82+ | ` AMAP_TOKEN ` | AMap (Gaode) API token | - | ` your-amap-token ` |
83+ | ` MAPBOX_TOKEN ` | Mapbox API token | - | ` your-mapbox-token ` |
8484
8585## Telemetry
8686
87- | Variable | Description | Default | Example |
88- | --- | --- | --- | --- |
89- | ` DISABLE_ANONYMOUS_TELEMETRY ` | Disable anonymous telemetry | ` false ` | ` true ` |
90- | ` CUSTOM_TRACKER_SCRIPT_NAME ` | Custom tracker script name | - | ` custom-tracker.js ` |
87+ | Variable | Description | Default | Example |
88+ | ----------------------------- | --------------------------- | ------- | ------------------- |
89+ | ` DISABLE_ANONYMOUS_TELEMETRY ` | Disable anonymous telemetry | ` false ` | ` true ` |
90+ | ` CUSTOM_TRACKER_SCRIPT_NAME ` | Custom tracker script name | - | ` custom-tracker.js ` |
91+
92+ ## Server Status Reporting
93+
94+ | Variable | Description | Default | Example |
95+ | ---------------------- | ---------------------------------- | ------- | --------------------------- |
96+ | ` SERVER_STATUS_SECRET ` | Secret for server status reporting | - | ` your-server-status-secret ` |
9197
9298## Setting Environment Variables
9399
0 commit comments