Skip to content

Commit 825a419

Browse files
authored
chore(cleanup): simplify what the Redis, config and removal changes left behind (#10286)
* chore(cleanup): simplify what the Redis, config and removal changes left behind * docs: name every Search and Redis requirement precisely
1 parent 7a902fc commit 825a419

112 files changed

Lines changed: 430 additions & 823 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/rules/sim-testing.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ contracts, and demonstrated regressions.
3434
| Suffix | Needs | Run with | In CI |
3535
|--------|-------|----------|-------|
3636
| `*.test.ts(x)` | nothing; global mocks from `vitest.setup.ts` | `bun run --cwd <workspace> test` | `test` jobs |
37-
| `*.integration.ts` | real PostgreSQL (`TEST_DATABASE_URL`) and Redis (`TEST_REDIS_URL`: required by `apps/sim` and `apps/realtime`; `packages/db` runs without it locally and requires it in CI) | `bun run --cwd <workspace> test --mode integration` | `integration` jobs, by glob (sharded per provisioning path) |
37+
| `*.integration.ts` | real PostgreSQL (`TEST_DATABASE_URL`) and Redis (`TEST_REDIS_URL`: required by `apps/sim`, `apps/realtime`, and `packages/db`; `apps/sim` needs a non-zero database index) | `bun run --cwd <workspace> test --mode integration` | `integration` jobs, by glob (sharded per provisioning path) |
3838
| `*.live.test.ts` | provider APIs, hosted sandboxes, local runtimes, or sibling checkouts | `bun run --cwd apps/sim test --mode live <file>` | never |
3939
| `apps/desktop/e2e/*.spec.ts` | the packaged Electron app | Playwright | desktop E2E workflow |
4040
| `apps/sim/scripts/test-*-e2e.ts` | a running app over HTTP | its `package.json` script when one exists (`bun run test:scim:e2e`; `test:workflow-version-compare:e2e` adds `--no-env-file`), else `bun scripts/test-<suite>-e2e.ts` from apps/sim | `e2e` jobs (`.github/scripts/http-e2e.sh`) |

‎.cursor/rules/sim-testing.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ contracts, and demonstrated regressions.
3131
| Suffix | Needs | Run with | In CI |
3232
|--------|-------|----------|-------|
3333
| `*.test.ts(x)` | nothing; global mocks from `vitest.setup.ts` | `bun run --cwd <workspace> test` | `test` jobs |
34-
| `*.integration.ts` | real PostgreSQL (`TEST_DATABASE_URL`) and Redis (`TEST_REDIS_URL`: required by `apps/sim` and `apps/realtime`; `packages/db` runs without it locally and requires it in CI) | `bun run --cwd <workspace> test --mode integration` | `integration` jobs, by glob (sharded per provisioning path) |
34+
| `*.integration.ts` | real PostgreSQL (`TEST_DATABASE_URL`) and Redis (`TEST_REDIS_URL`: required by `apps/sim`, `apps/realtime`, and `packages/db`; `apps/sim` needs a non-zero database index) | `bun run --cwd <workspace> test --mode integration` | `integration` jobs, by glob (sharded per provisioning path) |
3535
| `*.live.test.ts` | provider APIs, hosted sandboxes, local runtimes, or sibling checkouts | `bun run --cwd apps/sim test --mode live <file>` | never |
3636
| `apps/desktop/e2e/*.spec.ts` | the packaged Electron app | Playwright | desktop E2E workflow |
3737
| `apps/sim/scripts/test-*-e2e.ts` | a running app over HTTP | its `package.json` script when one exists (`bun run test:scim:e2e`; `test:workflow-version-compare:e2e` adds `--no-env-file`), else `bun scripts/test-<suite>-e2e.ts` from apps/sim | `e2e` jobs (`.github/scripts/http-e2e.sh`) |

‎.github/CONTRIBUTING.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ BETTER_AUTH_SECRET=$(openssl rand -hex 32)
169169
ENCRYPTION_KEY=$(openssl rand -hex 32)
170170
INTERNAL_API_SECRET=$(openssl rand -hex 32)
171171
CRON_SECRET=$(openssl rand -hex 32)
172+
POSTGRES_PASSWORD=$(openssl rand -hex 24)
172173
EOF
173174

174175
# Start Sim
@@ -237,7 +238,7 @@ If you prefer not to use Docker. **All commands run from the repository root unl
237238
cp packages/db/.env.example packages/db/.env
238239
```
239240

240-
At minimum, each `.env` needs `DATABASE_URL`. `apps/sim/.env` and `apps/realtime/.env` additionally need matching values for `BETTER_AUTH_URL`, `BETTER_AUTH_SECRET`, `INTERNAL_API_SECRET`, and `NEXT_PUBLIC_APP_URL`. `apps/sim/.env` also needs `ENCRYPTION_KEY` and `API_ENCRYPTION_KEY`. Generate any 32-char secrets with `openssl rand -hex 32`.
241+
At minimum, each `.env` needs `DATABASE_URL`. `apps/sim/.env` and `apps/realtime/.env` additionally need matching values for `BETTER_AUTH_URL`, `BETTER_AUTH_SECRET`, `INTERNAL_API_SECRET`, `NEXT_PUBLIC_APP_URL`, and `REDIS_URL`: both services refuse to start without Redis (for a local one, run `docker run -d -p 127.0.0.1:6379:6379 redis:7-alpine` and set `REDIS_URL=redis://localhost:6379`). `apps/sim/.env` also needs `ENCRYPTION_KEY` and `API_ENCRYPTION_KEY`. Generate any 32-char secrets with `openssl rand -hex 32`.
241242

242243
The same `BETTER_AUTH_SECRET`, `INTERNAL_API_SECRET`, and `DATABASE_URL` must appear in both `apps/sim/.env` and `apps/realtime/.env` so the two services share auth and DB. After editing `apps/sim/.env`, you can mirror the shared subset into the realtime env in one shot:
243244

‎apps/desktop/src/renderer/offline/index.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
AuthRoot,
44
AuthShellView,
55
AuthTextLink,
6-
AuthWordmark,
76
AuthButton as Chip,
87
AuthStatusContent as StatusPageContent,
98
} from '@sim/auth-ui'
@@ -71,7 +70,6 @@ function OfflinePage({ isSimCloud }: OfflinePageProps) {
7170
<AuthRoot>
7271
<AuthShellView
7372
homeHref='https://sim.ai'
74-
logo={<AuthWordmark />}
7573
titlebar={<div data-auth-titlebar='' aria-hidden='true' />}
7674
footer={
7775
<AuthTextLink

‎apps/docs/content/docs/platform/enterprise/self-hosted.mdx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,6 @@ Each feature is one server variable. Permission groups also turn on organization
259259

260260
A Sandbox entitlement also requires a remote execution provider with credentials and an immutable Function base image. Until the server verifies readiness, the Function block offers no **Shell** language, and **Settings → Sandboxes** shows an upgrade notice instead of a sandbox list.
261261

262-
The Function block's **Sandbox** selector appears once the server confirms both the entitlement and a ready provider. There is no browser variable to set.
263-
264262
JavaScript without `import`, `require`, a selected sandbox, or a sandbox file-path reference runs in local Node child workers in the app container when Sandbox flags are off. Python, Shell, JavaScript with external imports, and selected custom Sandboxes require the remote Function base and fail with a configuration error until it is ready. See [Sandboxes](/platform/self-hosting/sandboxes).
265263

266264
## Verify the setup

‎apps/docs/content/docs/platform/self-hosting/authentication.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Or enable SSO alone:
123123
SSO_ENABLED=true
124124
```
125125

126-
Each is a server variable; the login page and settings read the server's setting, so there is no browser counterpart. Register providers under **Settings → Organization → Single sign-on**. A provider can belong to an organization or be registered without one.
126+
Restart the app after changing either. Register providers under **Settings → Organization → Single sign-on**. A provider can belong to an organization or be registered without one.
127127

128128
Most other enterprise features read settings from the organization that owns a workspace. Set `INSTANCE_ORG_NAME` to place new members in one organization, or provision organizations through the Admin API. See [SSO](/platform/enterprise/sso) and [Self-hosted enterprise features](/platform/enterprise/self-hosted) for provider setup, organization patterns, and billing-enabled behavior.
129129

‎apps/docs/content/docs/platform/self-hosting/docker.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ Recreate the app using the file that started your installation:
218218

219219
```bash
220220
COMPOSE_FILE=docker-compose.prod.yml
221-
# For a source-built stack, use docker-compose.local.yml. With bundled Ollama,
222-
# add the overlay: -f docker-compose.prod.yml -f docker-compose.ollama.yml
221+
# For a source-built stack, use docker-compose.local.yml. A stack running the
222+
# Ollama overlay is a docker-compose.prod.yml install.
223223
docker compose -f "$COMPOSE_FILE" up -d --force-recreate simstudio
224224
```
225225

‎apps/docs/content/docs/platform/self-hosting/environment-variables.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ On standard billing-disabled self-hosted deployments, configuration enables ente
216216

217217
| Variable | Description |
218218
|----------|-------------|
219-
| `ENTERPRISE_ENABLED` | Enable the whole enterprise feature set. Each feature is one server variable; the browser reads the server's settings, so no `NEXT_PUBLIC_` counterpart is needed |
219+
| `ENTERPRISE_ENABLED` | Enable the whole enterprise feature set. Server variable only; see [the feature flag reference](/platform/enterprise/self-hosted#feature-flag-reference) |
220220
| `SSO_ENABLED` | Enable SAML and OIDC single sign-on on its own. See [Authentication](/platform/self-hosting/authentication#sso-saml-and-oidc) |
221221
| `SSO_SKIP_DOMAIN_VERIFICATION` | Skip the DNS challenge when an administrator clicks Verify on a domain. Off by default; self-hosted only. Trusts administrator claims for SSO and SCIM across the instance. See [Verified domains](/platform/enterprise/verified-domains#skip-dns-verification) |
222222
| `SCIM_ENABLED` | Enable directory provisioning on its own. Needs SSO. See [Directory provisioning](/platform/enterprise/scim) |
@@ -260,7 +260,6 @@ Configure at least one. Every configured provider stays active and is tried in o
260260
| `RESUME_EXECUTION_CONCURRENCY_LIMIT` | `50` | Trigger.dev resume task concurrency |
261261
| `EGRESS_ALLOWED_HOSTS` | unset | Comma-separated hostnames outbound requests may reach on a private network. Leading wildcard allowed, e.g. `host.docker.internal,*.svc.cluster.local`. Not honored for URLs harvested from content or a third-party response, nor for an HTTP block's `proxyUrl` |
262262
| `EGRESS_ALLOWED_IP_RANGES` | unset | Comma-separated CIDRs or IPs outbound requests may reach on a private network, e.g. `10.0.0.0/8`. Same exclusions |
263-
| `ALLOW_PRIVATE_DATABASE_HOSTS` | unset | **Removed.** Has no effect; the app logs an error at startup if it is still set. Name each database, cache, or mail host in `EGRESS_ALLOWED_HOSTS` instead; a host reached by IP address, including any IPv6 literal (which `EGRESS_ALLOWED_HOSTS` rejects), takes a single-address entry such as `10.0.0.5/32` in `EGRESS_ALLOWED_IP_RANGES`. Do not allowlist whole private ranges, which would widen what workflow HTTP blocks can reach, or `localhost`, where Sim's own database and Redis listen |
264263
| `DOMAIN_VERIFICATION_NAMESERVERS` | `1.1.1.1,8.8.8.8` | Comma-separated nameserver IPs that SSO domain verification sends its TXT lookup to. Set it when the network only allows DNS to an internal resolver. Entries that are not IP addresses are ignored |
265264

266265
A malformed entry in either allowlist stops the app at startup with a message naming the setting. See [the SSRF boundary](/platform/self-hosting/security#the-ssrf-boundary) for the accepted syntax and for what the allowlist does and does not reach.

‎apps/docs/content/docs/platform/self-hosting/platforms.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The [Sim deployment template](https://railway.com/new/template/sim-studio) provi
1616
3. Retain generated secrets, set `API_ENCRYPTION_KEY`, and configure durable storage.
1717
4. Configure your domain under **Settings → Networking**. Set `NEXT_PUBLIC_APP_URL` and `BETTER_AUTH_URL` to that app origin; match `NEXT_PUBLIC_SOCKET_URL` to the realtime endpoint.
1818
5. Add a model provider key such as `OPENAI_API_KEY` and configure email if needed.
19-
6. Check Redis and the scheduler rather than assuming the template includes them.
19+
6. Confirm Redis and the scheduler rather than assuming the template includes them. Sim refuses to start without Redis, and the app and realtime services share one `REDIS_URL`.
2020

2121
<Callout type="warn">
2222
Railway Cron Jobs run no more often than every five minutes. They cannot reproduce Sim's bundled minute-level scheduler cadence. Use a continuously running Sim scheduler service or another scheduler supporting the schedules in [Background jobs](/platform/self-hosting/background-jobs). See [Railway's cron requirements](https://docs.railway.com/cron-jobs).

‎apps/docs/content/docs/platform/self-hosting/reference-architectures.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Use `helm/sim/examples/values-gcp.yaml` as a starting point. It configures Persi
9595
| ManagedCertificate | Created before the first deploy — nothing in the chart creates it. The example values reference `simstudio-ssl-cert`; match whatever name your ingress annotation uses |
9696
| Cloud SQL for PostgreSQL | With `pgvector` |
9797
| GCS buckets | One per file purpose. Every purpose-specific bucket falls back to the general one |
98-
| Memorystore | Optional |
98+
| Memorystore | Recommended for production; Sim requires Redis, and the bundled one is a supported alternative |
9999

100100
<Callout type="warn">
101101
When using only a ManagedCertificate, keep `ingress.tls.enabled: false` so the chart does not reference a missing Secret. GCE Ingress also supports provisioned TLS Secrets and can retain self-managed certificates while a managed certificate becomes active. If you enable chart TLS, create the referenced Secret. See [Google's certificate setup and migration guide](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/secure-traffic-management).

0 commit comments

Comments
 (0)