Skip to content

Commit 87aae09

Browse files
committed
add webapp env vars
1 parent 7b2bec7 commit 87aae09

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

docs/self-hosting/env/webapp.mdx

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: "Webapp"
3+
description: "Environment variables for the webapp container."
4+
sidebarTitle: "Webapp"
5+
tag: "v4"
6+
mode: "wide"
7+
---
8+
9+
| Name | Required | Default | Description |
10+
| :--------------------------------------------- | :------- | :-------------------- | :----------------------------------------------------------------- |
11+
| **Secrets** | | | |
12+
| `SESSION_SECRET` | Yes || Session encryption secret. Run: `openssl rand -hex 16` |
13+
| `MAGIC_LINK_SECRET` | Yes || Magic link encryption secret. Run: `openssl rand -hex 16` |
14+
| `ENCRYPTION_KEY` | Yes || Secret store encryption key. Run: `openssl rand -hex 16` |
15+
| `MANAGED_WORKER_SECRET` | No | managed-secret | Managed worker secret. Should be changed and match supervisor. |
16+
| **Domains & ports** | | | |
17+
| `REMIX_APP_PORT` | No | 3030 | Remix app port. |
18+
| `APP_ORIGIN` | Yes | http://localhost:3030 | App origin URL. |
19+
| `LOGIN_ORIGIN` | Yes | http://localhost:3030 | Login origin URL. Most likely the same as `APP_ORIGIN`. |
20+
| `API_ORIGIN` | No | `APP_ORIGIN` | API origin URL. |
21+
| `STREAM_ORIGIN` | No | `APP_ORIGIN` | Realtime stream origin URL. |
22+
| `ELECTRIC_ORIGIN` | No | http://localhost:3060 | Electric origin URL. |
23+
| **Postgres** | | | |
24+
| `DATABASE_URL` | Yes || PostgreSQL connection string. |
25+
| `DIRECT_URL` | Yes || Direct DB connection string used for migrations etc. |
26+
| `DATABASE_CONNECTION_LIMIT` | No | 10 | Max DB connections. |
27+
| `DATABASE_POOL_TIMEOUT` | No | 60 | DB pool timeout (s). |
28+
| `DATABASE_CONNECTION_TIMEOUT` | No | 20 | DB connect timeout (s). |
29+
| `DATABASE_READ_REPLICA_URL` | No | `DATABASE_URL` | Read-replica DB string. |
30+
| **Redis** | | | |
31+
| `REDIS_HOST` | Yes || Redis host. |
32+
| `REDIS_PORT` | Yes || Redis port. |
33+
| `REDIS_READER_HOST` | No | `REDIS_HOST` | Redis reader host. |
34+
| `REDIS_READER_PORT` | No | `REDIS_PORT` | Redis reader port. |
35+
| `REDIS_USERNAME` | No || Redis username. |
36+
| `REDIS_PASSWORD` | No || Redis password. |
37+
| `REDIS_TLS_DISABLED` | No || Disable Redis TLS. |
38+
| **Auth** | | | |
39+
| `WHITELISTED_EMAILS` | No || Whitelisted emails regex. |
40+
| `AUTH_GITHUB_CLIENT_ID` | No || GitHub client ID. |
41+
| `AUTH_GITHUB_CLIENT_SECRET` | No || GitHub client secret. |
42+
| **Email** | | | |
43+
| `EMAIL_TRANSPORT` | No || Email transport type. One of `resend`, `smtp`, `aws-ses`. |
44+
| `FROM_EMAIL` | No || From email address. |
45+
| `REPLY_TO_EMAIL` | No || Reply-to email address. |
46+
| `RESEND_API_KEY` | No || Resend API key. |
47+
| `SMTP_HOST` | No || SMTP host. |
48+
| `SMTP_PORT` | No || SMTP port. |
49+
| `SMTP_SECURE` | No || SMTP secure flag. |
50+
| `SMTP_USER` | No || SMTP user. |
51+
| `SMTP_PASSWORD` | No || SMTP password. |
52+
| `AWS_REGION` | No || AWS region for SES. |
53+
| `AWS_ACCESS_KEY_ID` | No || AWS access key ID for SES. |
54+
| `AWS_SECRET_ACCESS_KEY` | No || AWS secret access key for SES. |
55+
| **Graphile & Redis worker** | | | |
56+
| `WORKER_CONCURRENCY` | No | 10 | Redis worker concurrency. |
57+
| `WORKER_POLL_INTERVAL` | No | 1000 | Redis worker poll interval (ms). |
58+
| `WORKER_SCHEMA` | No | graphile_worker | Graphile worker schema. |
59+
| `GRACEFUL_SHUTDOWN_TIMEOUT` | No | 60000 (1m) | Graphile graceful shutdown timeout (ms). Affects shutdown time. |
60+
| **Concurrency limits** | | | |
61+
| `DEFAULT_ENV_EXECUTION_CONCURRENCY_LIMIT` | No | 100 | Default env execution concurrency. |
62+
| `DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT` | No | 300 | Default org execution concurrency, needs to be 3x env concurrency. |
63+
| **Dev** | | | |
64+
| `DEV_MAX_CONCURRENT_RUNS` | No | 25 | Sets the max concurrency for dev runs via the CLI. |
65+
| `DEV_OTEL_EXPORTER_OTLP_ENDPOINT` | No | `APP_ORIGIN/otel` | OTel endpoint for dev runs. |
66+
| **Rate limiting** | | | |
67+
| `API_RATE_LIMIT_REFILL_INTERVAL` | No | 10s | API rate limit refill interval. |
68+
| `API_RATE_LIMIT_MAX` | No | 750 | API rate limit max. |
69+
| `API_RATE_LIMIT_REFILL_RATE` | No | 250 | API rate limit refill rate. |
70+
| `API_RATE_LIMIT_REQUEST_LOGS_ENABLED` | No | 0 | API rate limit request logs. |
71+
| `API_RATE_LIMIT_REJECTION_LOGS_ENABLED` | No | 1 | API rate limit rejection logs. |
72+
| `API_RATE_LIMIT_LIMITER_LOGS_ENABLED` | No | 0 | API rate limit limiter logs. |
73+
| `API_RATE_LIMIT_JWT_WINDOW` | No | 1m | API rate limit JWT window. |
74+
| `API_RATE_LIMIT_JWT_TOKENS` | No | 60 | API rate limit JWT tokens. |
75+
| **Deploy & Registry** | | | |
76+
| `DEPLOY_REGISTRY_HOST` | Yes || Deploy registry host. |
77+
| `DEPLOY_REGISTRY_USERNAME` | No || Deploy registry username. |
78+
| `DEPLOY_REGISTRY_PASSWORD` | No || Deploy registry password. |
79+
| `DEPLOY_REGISTRY_NAMESPACE` | No | trigger | Deploy registry namespace. |
80+
| `DEPLOY_IMAGE_PLATFORM` | No | linux/amd64 | Deploy image platform, same values as docker `--platform` flag. |
81+
| `DEPLOY_TIMEOUT_MS` | No | 480000 (8m) | Deploy timeout (ms). |
82+
| **Object store (S3)** | | | |
83+
| `OBJECT_STORE_BASE_URL` | No || Object store base URL. |
84+
| `OBJECT_STORE_ACCESS_KEY_ID` | No || Object store access key. |
85+
| `OBJECT_STORE_SECRET_ACCESS_KEY` | No || Object store secret key. |
86+
| `OBJECT_STORE_REGION` | No || Object store region. |
87+
| `OBJECT_STORE_SERVICE` | No | s3 | Object store service. |
88+
| **Alerts** | | | |
89+
| `ORG_SLACK_INTEGRATION_CLIENT_ID` | No || Slack client ID. Required for Slack alerts. |
90+
| `ORG_SLACK_INTEGRATION_CLIENT_SECRET` | No || Slack client secret. Required for Slack alerts. |
91+
| `ALERT_EMAIL_TRANSPORT` | No || Alert email transport. |
92+
| `ALERT_FROM_EMAIL` | No || Alert from email. |
93+
| `ALERT_REPLY_TO_EMAIL` | No || Alert reply-to email. |
94+
| `ALERT_RESEND_API_KEY` | No || Alert Resend API key. |
95+
| `ALERT_SMTP_HOST` | No || Alert SMTP host. |
96+
| `ALERT_SMTP_PORT` | No || Alert SMTP port. |
97+
| `ALERT_SMTP_SECURE` | No || Alert SMTP secure. |
98+
| `ALERT_SMTP_USER` | No || Alert SMTP user. |
99+
| `ALERT_SMTP_PASSWORD` | No || Alert SMTP password. |
100+
| **Limits** | | | |
101+
| `TASK_PAYLOAD_OFFLOAD_THRESHOLD` | No | 524288 (512KB) | Max task payload size before offloading to S3. |
102+
| `TASK_PAYLOAD_MAXIMUM_SIZE` | No | 3145728 (3MB) | Max task payload size. |
103+
| `BATCH_TASK_PAYLOAD_MAXIMUM_SIZE` | No | 1000000 (1MB) | Max batch payload size. |
104+
| `TASK_RUN_METADATA_MAXIMUM_SIZE` | No | 262144 (256KB) | Max metadata size. |
105+
| `MAX_BATCH_V2_TRIGGER_ITEMS` | No | 500 | Max batch size. |
106+
| `MAXIMUM_DEV_QUEUE_SIZE` | No || Max dev queue size. |
107+
| `MAXIMUM_DEPLOYED_QUEUE_SIZE` | No || Max deployed queue size. |
108+
| **Realtime** | | | |
109+
| `REALTIME_STREAM_MAX_LENGTH` | No | 1000 | Realtime stream max length. |
110+
| `REALTIME_STREAM_TTL` | No | 86400 (1d) | Realtime stream TTL (s). |
111+
| **Bootstrap** | | | |
112+
| `TRIGGER_BOOTSTRAP_ENABLED` | No | 0 | Trigger bootstrap enabled. |
113+
| `TRIGGER_BOOTSTRAP_WORKER_GROUP_NAME` | No || Trigger bootstrap worker group name. |
114+
| `TRIGGER_BOOTSTRAP_WORKER_TOKEN_PATH` | No || Trigger bootstrap worker token path. |
115+
| **Run engine** | | | |
116+
| `RUN_ENGINE_WORKER_COUNT` | No | 4 | Run engine worker count. |
117+
| `RUN_ENGINE_TASKS_PER_WORKER` | No | 10 | Run engine tasks per worker. |
118+
| `RUN_ENGINE_WORKER_CONCURRENCY_LIMIT` | No | 10 | Run engine worker concurrency limit. |
119+
| `RUN_ENGINE_WORKER_POLL_INTERVAL` | No | 100 | Run engine worker poll interval (ms). |
120+
| `RUN_ENGINE_WORKER_IMMEDIATE_POLL_INTERVAL` | No | 100 | Run engine worker immediate poll interval (ms). |
121+
| `RUN_ENGINE_WORKER_SHUTDOWN_TIMEOUT_MS` | No | 60000 (1m) | Run engine worker shutdown timeout (ms). |
122+
| `RUN_ENGINE_RATE_LIMIT_REFILL_INTERVAL` | No | 10s | Run engine rate limit refill interval. |
123+
| `RUN_ENGINE_RATE_LIMIT_MAX` | No | 1200 | Run engine rate limit max. |
124+
| `RUN_ENGINE_RATE_LIMIT_REFILL_RATE` | No | 400 | Run engine rate limit refill rate. |
125+
| `RUN_ENGINE_RATE_LIMIT_REQUEST_LOGS_ENABLED` | No | 0 | Run engine rate limit request logs. |
126+
| `RUN_ENGINE_RATE_LIMIT_REJECTION_LOGS_ENABLED` | No | 1 | Run engine rate limit rejection logs. |
127+
| `RUN_ENGINE_RATE_LIMIT_LIMITER_LOGS_ENABLED` | No | 0 | Run engine rate limit limiter logs. |
128+
| **Misc** | | | |
129+
| `TRIGGER_TELEMETRY_DISABLED` | No || Disable telemetry. |
130+
| `NODE_MAX_OLD_SPACE_SIZE` | No || Maximum memory allocation for Node.js heap (e.g. "4096" for 4GB). |
131+
| `OPENAI_API_KEY` | No || OpenAI API key. |
132+
| `MACHINE_PRESETS_OVERRIDE_PATH` | No || Path to machine presets override file. |
133+
| `APP_ENV` | No | `NODE_ENV` | App environment. Used for things like the title tag. |
134+
| `ADMIN_EMAILS` | No || Regex of user emails to automatically promote to admin. |
135+
| `EVENT_LOOP_MONITOR_ENABLED` | No | 1 | Node.js event loop lag monitor. |

0 commit comments

Comments
 (0)