Skip to content

Commit 41a2341

Browse files
author
Goncalves, Carla
committed
docs: bookmarklet appOrigin → Cloud Run (europe-west2)
Made-with: Cursor
1 parent 3347aef commit 41a2341

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Its behaviour is:
6363
- **reuse one instance**: running the bookmarklet again focuses the same root; if you navigate and run it again, the iframe reloads with the new page URL
6464
- **Close** tears the UI down completely
6565

66-
The public docs site builds the install link from [`docs/config.js`](docs/config.js) and [`docs/install.js`](docs/install.js). The **committed** `docs/config.js` targets production (`https://carla-site-crawler.fly.dev` by default—change it to your real deploy). For local testing only, run `APP_ENV=local node scripts/write-public-config.mjs` (never commit that output). `scripts/validate-committed-docs-config.mjs` rejects loopback or non-HTTPS origins in the tracked file.
66+
The public docs site builds the install link from [`docs/config.js`](docs/config.js) and [`docs/install.js`](docs/install.js). The **committed** `docs/config.js` sets `appOrigin` to your production app (currently **Google Cloud Run**: `https://site-crawler-909296093050.europe-west2.run.app`). For local testing only, run `APP_ENV=local node scripts/write-public-config.mjs` (never commit that output). `scripts/validate-committed-docs-config.mjs` rejects loopback or non-HTTPS origins in the tracked file.
6767

6868
## Current Architecture And Run Model
6969

@@ -225,12 +225,18 @@ For staging or production:
225225
Example docs config generation:
226226

227227
```bash
228-
APP_ENV=production BOOKMARKLET_APP_ORIGIN=https://carla-site-crawler.fly.dev node scripts/write-public-config.mjs
228+
APP_ENV=production BOOKMARKLET_APP_ORIGIN=https://site-crawler-909296093050.europe-west2.run.app node scripts/write-public-config.mjs
229229
```
230230

231-
### Fly.io
231+
### Google Cloud Run (production app)
232232

233-
[`fly.toml`](fly.toml) defines app name `carla-site-crawler` (URL `https://carla-site-crawler.fly.dev` when that name is available). Deploy with the Fly CLI: `fly launch` once, then `fly deploy`. Set production secrets (for example `JOB_STATE_BACKEND=firestore`) per your environment.
233+
The live UI + API for Cat Crawler is deployed separately from GitHub Pages—for example on **[Cloud Run](https://cloud.google.com/run)**. The bookmarklet’s `appOrigin` must match that HTTPS origin (no trailing slash), e.g. `https://site-crawler-909296093050.europe-west2.run.app`.
234+
235+
GitHub Pages only serves the static docs and bookmarklet loader; crawls still run against your Cloud Run service.
236+
237+
### Fly.io (optional)
238+
239+
[`fly.toml`](fly.toml) is only relevant if you choose to deploy with [Fly.io](https://fly.io/) instead of (or in addition to) Cloud Run. Ignore it if you use Cloud Run only.
234240

235241
### Doc screenshots (Playwright)
236242

docs/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
window.CAT_CRAWLER_PUBLIC_CONFIG = Object.freeze({
22
environment: "production",
3-
appOrigin: "https://carla-site-crawler.fly.dev"
3+
appOrigin: "https://site-crawler-909296093050.europe-west2.run.app"
44
});

0 commit comments

Comments
 (0)