-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy the console to Fly at apps.theoremweb.com #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| .git | ||
| **/.git | ||
| **/.env | ||
| **/.env.* | ||
| !**/.env.example | ||
| .pnpm-store | ||
| crates | ||
| **/node_modules | ||
| **/.next | ||
| **/dist | ||
| **/test-results | ||
| **/.turbo | ||
| apps/desktop | ||
| apps/mobile | ||
| apps/browser-native | ||
| apps/chat | ||
| apps/commonplace-collab | ||
| apps/theorem-vscode | ||
| apps/commonplace-api | ||
| .theorem | ||
| .full-stack-feature | ||
| .playwright-mcp | ||
| plans | ||
| docs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # CommonPlace console for Fly. Build context is the CommonPlace repo root. | ||
| FROM node:22-bookworm | ||
|
|
||
| WORKDIR /app | ||
| ENV NEXT_TELEMETRY_DISABLED=1 | ||
| ENV PORT=8080 | ||
|
|
||
| RUN corepack enable | ||
|
|
||
| COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ | ||
| COPY apps/console ./apps/console | ||
| COPY packages ./packages | ||
| COPY .commonplace-canonical .commonplace-canonical | ||
|
|
||
| # NEXT_PUBLIC_* is inlined at `next build`. Runtime Fly secrets do not reach this step. | ||
| ARG NEXT_PUBLIC_CONSOLE_CHAT_URL=/api/chat/stream | ||
| ARG NEXT_PUBLIC_THEOREM_GATEWAY_URL= | ||
| ENV NEXT_PUBLIC_CONSOLE_CHAT_URL=$NEXT_PUBLIC_CONSOLE_CHAT_URL | ||
| ENV NEXT_PUBLIC_THEOREM_GATEWAY_URL=$NEXT_PUBLIC_THEOREM_GATEWAY_URL | ||
|
|
||
| RUN pnpm install --no-frozen-lockfile --filter @commonplace/console... \ | ||
| && pnpm --filter @commonplace/console run build:railway | ||
|
|
||
| EXPOSE 8080 | ||
| CMD ["node", "apps/console/scripts/start-railway.mjs"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # CommonPlace product console. Public hostname is apps.theoremweb.com | ||
| # (apex theoremweb.com stays on Vercel / Theseus). | ||
| # | ||
| # Deploy from the CommonPlace repo root: | ||
| # fly deploy --config fly.console.toml --app travis-commonplace-console | ||
| app = "travis-commonplace-console" | ||
| primary_region = "iad" | ||
| kill_signal = "SIGTERM" | ||
| kill_timeout = "30s" | ||
|
|
||
| [build] | ||
| dockerfile = "apps/console/Dockerfile" | ||
|
|
||
| [build.args] | ||
| NEXT_PUBLIC_CONSOLE_CHAT_URL = "/api/chat/stream" | ||
|
|
||
| [env] | ||
| PORT = "8080" | ||
| HOSTNAME = "0.0.0.0" | ||
| AUTH_TRUST_HOST = "true" | ||
| AUTH_URL = "https://apps.theoremweb.com" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When this Fly configuration is deployed, AGENTS.md reference: apps/console/AGENTS.md:L18-L22 Useful? React with 👍 / 👎.
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the Fly environment, neither Useful? React with 👍 / 👎.
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Useful? React with 👍 / 👎. |
||
|
|
||
| [http_service] | ||
| internal_port = 8080 | ||
| force_https = true | ||
| auto_stop_machines = "off" | ||
| auto_start_machines = true | ||
| min_machines_running = 1 | ||
| processes = ["app"] | ||
|
|
||
| [[http_service.checks]] | ||
| grace_period = "1m" | ||
| interval = "15s" | ||
| method = "GET" | ||
| path = "/api/healthz" | ||
| protocol = "http" | ||
| timeout = "10s" | ||
|
|
||
| [[vm]] | ||
| size = "shared-cpu-2x" | ||
| memory = "2gb" | ||
| processes = ["app"] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For images built from the checked-in Fly configuration, this argument remains empty because
[build.args]supplies onlyNEXT_PUBLIC_CONSOLE_CHAT_URL. Since this public variable is inlined duringnext build, runtime secrets cannot repair it: program runs that return only arecording_idopenprototype.stagewithout a gateway base, and the stage renders its named unavailable state instead of loading the recording. ProvideNEXT_PUBLIC_THEOREM_GATEWAY_URLinfly.console.tomlor a usable build-time default.Useful? React with 👍 / 👎.