Title: fix(docker): require auth secrets in prod and Ollama Compose files by waleedlatif1 · Pull Request #5806 · simstudioai/sim · GitHub
Open Graph Title: fix(docker): require auth secrets in prod and Ollama Compose files by waleedlatif1 · Pull Request #5806 · simstudioai/sim
X Title: fix(docker): require auth secrets in prod and Ollama Compose files by waleedlatif1 · Pull Request #5806 · simstudioai/sim
Description: Summary Builds on #5801 (included as the first commit) and closes the remaining gap in that fix: the same first-user-signup failure still exists in docker-compose.ollama.yml, which many self-hosters use because it's the "try Sim with local models" path. Root cause (the part #5801 didn't cover) docker-compose.ollama.yml fell back to broken secret defaults: BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-sim_auth_secret_$(openssl rand -hex 16)} and ENCRYPTION_KEY=${ENCRYPTION_KEY:-$(openssl rand -hex 32)} — Docker Compose does not perform $(...) command substitution, so these resolve to the literal strings, i.e. a fixed, shared, weak secret across every install. Worse, the ENCRYPTION_KEY literal ($(openssl rand -hex 32), 22 chars) is under the 32-char minimum the app enforces (z.string().min(32)), so it fails env validation. INTERNAL_API_SECRET — required (z.string().min(32)) by both the app (apps/sim/lib/core/config/env.ts) and realtime (apps/realtime/src/env.ts) — was not passed at all, so the Ollama quick start couldn't sign up the first admin, exactly like the prod bug in #5625. Changes Mirror the prod hardening in docker-compose.ollama.yml: require BETTER_AUTH_SECRET, ENCRYPTION_KEY, and INTERNAL_API_SECRET via mandatory ${VAR:?...} interpolation, and add INTERNAL_API_SECRET to both simstudio and realtime. Extend the regression test to assert the mandatory-secret interpolation for both docker-compose.prod.yml and docker-compose.ollama.yml. Note the .env prerequisite in the Ollama section of the docs (en/de/es/fr/ja/zh) and CONTRIBUTING. Validation vitest run lib/core/config/docker-compose-secrets.test.ts — 10 passed (5 prod + 5 ollama; the test parses the real Compose files). biome check on the test file — passed. Both Compose files parse as valid YAML (loaded by the test via js-yaml). Credit First commit is @brainx's original #5801. This PR supersedes it — merging this lands both fixes together. Fixes #5625
Open Graph Description: Summary Builds on #5801 (included as the first commit) and closes the remaining gap in that fix: the same first-user-signup failure still exists in docker-compose.ollama.yml, which many self-hoster...
X Description: Summary Builds on #5801 (included as the first commit) and closes the remaining gap in that fix: the same first-user-signup failure still exists in docker-compose.ollama.yml, which many self-hoster...
Opengraph URL: https://github.com/simstudioai/sim/pull/5806
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fda41b5f-0b0c-2f5c-cafb-5ff159f6469a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EB52:15EB3D:51993:719E2:6A634E4A |
| html-safe-nonce | aec9ca9ba1708c2690531f26ab05893fe530ee129f95e16b2aff6c0022006ea8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjUyOjE1RUIzRDo1MTk5Mzo3MTlFMjo2QTYzNEU0QSIsInZpc2l0b3JfaWQiOiI1Nzg1ODc3Nzc0ODI2OTUwMjE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f95bc8f98a6dcc1169d2b351558c2d950f184262796b66c3203ec68d0bdcc564 |
| hovercard-subject-tag | pull_request:4102191658 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5806/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Builds on #5801 (included as the first commit) and closes the remaining gap in that fix: the same first-user-signup failure still exists in docker-compose.ollama.yml, which many self-hoster... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 990295d92a4cc7b63fbbd83a046217cd7d77d49c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width