fix knip + reorganize self hosting docs

This commit is contained in:
Ben Senescu 2026-06-28 16:50:16 -04:00
parent 6313812f3f
commit 93c2ecf48d
4 changed files with 96 additions and 103 deletions

View File

@ -56,6 +56,72 @@ Without a lifecycle rule, cached objects under `dataforseo-cache/` will accumula
If login fails, re-check the three secrets and Access toggle. If login fails, re-check the three secrets and Access toggle.
## Connect the MCP server through Cloudflare Access
Use the same Cloudflare Access application that protects your OpenSEO Worker.
Managed OAuth is required for MCP clients and is not enabled by default.
1. Open Cloudflare Zero Trust.
2. Go to `Access controls` -> `Applications`.
3. Find your OpenSEO application, then select `Edit`.
4. Go to `Additional settings` -> `OAuth`.
5. Turn on `Managed OAuth`.
6. Save.
MCP clients should connect to:
```text
https://YOUR_WORKER_HOSTNAME/mcp
```
## How to update to the latest OpenSEO version
If your repo was created from the Cloudflare Deploy button, use this flow.
### One-time setup
Run this once in your local repo:
```bash
git remote add upstream https://github.com/every-app/open-seo.git
git fetch upstream
```
### Update steps (use every time)
```bash
git fetch upstream
cp wrangler.jsonc wrangler.local.backup.jsonc
git checkout main
git reset --hard upstream/main
cp wrangler.local.backup.jsonc wrangler.jsonc
git add wrangler.jsonc
git commit -m "restore Cloudflare settings" || true
git push --force-with-lease origin main
```
Why this is needed:
- `wrangler.jsonc` has your Cloudflare resource IDs.
- The update step keeps your IDs while pulling the newest OpenSEO code.
## Give teammates access to OpenSEO
1. Open Cloudflare Zero Trust.
2. Go to Access -> Applications.
3. Open your OpenSEO application.
4. Edit the `Allow` policy.
5. Add teammate emails (or your company email domain / group).
6. Save.
Screenshots from the setup flow:
- [Edit the Access policy](https://github.com/user-attachments/assets/c7bbc7b4-a18e-4ae4-9fe5-3b33c72048a7)
- [Add teammate emails to the allow list](https://github.com/user-attachments/assets/fa4ecaf2-31f7-4a64-9001-210cf729747b)
After saving, teammates can open your OpenSEO URL and sign in through Cloudflare
Access. OpenSEO will use a shared workspace for everyone allowed by the policy.
## Manual deploy with Wrangler ## Manual deploy with Wrangler
Use this flow if the Deploy to Cloudflare button fails with `Cannot provision a KV Namespace with the title "open-seo" because it already exists`. The reliable path is to create Cloudflare resources yourself, put their IDs into `wrangler.jsonc`, then deploy with Wrangler. Use this flow if the Deploy to Cloudflare button fails with `Cannot provision a KV Namespace with the title "open-seo" because it already exists`. The reliable path is to create Cloudflare resources yourself, put their IDs into `wrangler.jsonc`, then deploy with Wrangler.
@ -177,69 +243,3 @@ pnpm exec wrangler r2 bucket lifecycle add open-seo-YOUR_SUFFIX dataforseo-cache
3. OpenSEO should load after login. 3. OpenSEO should load after login.
If login fails, re-check the three secrets, the Access toggle, and the binding values in `wrangler.jsonc`. If login fails, re-check the three secrets, the Access toggle, and the binding values in `wrangler.jsonc`.
## Connect the MCP server through Cloudflare Access
Use the same Cloudflare Access application that protects your OpenSEO Worker.
Managed OAuth is required for MCP clients and is not enabled by default.
1. Open Cloudflare Zero Trust.
2. Go to `Access controls` -> `Applications`.
3. Find your OpenSEO application, then select `Edit`.
4. Go to `Additional settings` -> `OAuth`.
5. Turn on `Managed OAuth`.
6. Save.
MCP clients should connect to:
```text
https://YOUR_WORKER_HOSTNAME/mcp
```
## How to update to the latest OpenSEO version
If your repo was created from the Cloudflare Deploy button, use this flow.
### One-time setup
Run this once in your local repo:
```bash
git remote add upstream https://github.com/every-app/open-seo.git
git fetch upstream
```
### Update steps (use every time)
```bash
git fetch upstream
cp wrangler.jsonc wrangler.local.backup.jsonc
git checkout main
git reset --hard upstream/main
cp wrangler.local.backup.jsonc wrangler.jsonc
git add wrangler.jsonc
git commit -m "restore Cloudflare settings" || true
git push --force-with-lease origin main
```
Why this is needed:
- `wrangler.jsonc` has your Cloudflare resource IDs.
- The update step keeps your IDs while pulling the newest OpenSEO code.
## Give teammates access to OpenSEO
1. Open Cloudflare Zero Trust.
2. Go to Access -> Applications.
3. Open your OpenSEO application.
4. Edit the `Allow` policy.
5. Add teammate emails (or your company email domain / group).
6. Save.
Screenshots from the setup flow:
- [Edit the Access policy](https://github.com/user-attachments/assets/c7bbc7b4-a18e-4ae4-9fe5-3b33c72048a7)
- [Add teammate emails to the allow list](https://github.com/user-attachments/assets/fa4ecaf2-31f7-4a64-9001-210cf729747b)
After saving, teammates can open your OpenSEO URL and sign in through Cloudflare
Access. OpenSEO will use a shared workspace for everyone allowed by the policy.

View File

View File

@ -1,38 +1,32 @@
{ {
"entry": [ "entry": [
// Detect Tanstack Start Routes // Detect Tanstack Start Routes
"cli-auth.ts", "cli-auth.ts",
"src/start.ts", "src/start.ts",
"src/server.ts", "src/server.ts",
"src/router.tsx", "src/router.tsx",
"src/routes/**/*.ts", "src/routes/**/*.ts",
"src/routes/**/*.tsx", "src/routes/**/*.tsx",
// Drizzle config (plugin disabled due to cloudflare:workers import issues) // Drizzle config (plugin disabled due to cloudflare:workers import issues)
"drizzle.config.ts", "drizzle.config.ts",
// Package script entrypoints // DB schema exports consumed via `import * as schema` / drizzle()
"scripts/backlinks-cost-profile.ts", "src/db/index.ts",
"scripts/brand-lookup-cost-profile.ts", "src/db/app.schema.ts",
"scripts/d1-default-project-cleanup.ts", "src/db/better-auth-schema.ts",
"scripts/release-notes.mjs", ],
"scripts/seed-rank-tracking.ts", "project": [
// DB schema exports consumed via `import * as schema` / drizzle() "**/*.{js,mjs,ts,tsx}",
"src/db/index.ts", "!src/routeTree.gen.ts",
"src/db/app.schema.ts", "!web/**"
"src/db/better-auth-schema.ts", ],
// Package scripts and one-off maintenance utilities "ignore": [
"scripts/backlinks-cost-profile.ts", "drizzle-prod.config.ts"
"scripts/brand-lookup-cost-profile.ts", ],
"scripts/d1-default-project-cleanup.ts", // Disable Drizzle plugin - it tries to load drizzle.config.ts which imports cloudflare:workers
"scripts/release-notes.mjs", "drizzle": false,
"scripts/seed-rank-tracking.ts", "ignoreDependencies": [
], // Tailwindcss used via @tailwindcss/vite plugin
"project": ["**/*.{js,mjs,ts,tsx}", "!src/routeTree.gen.ts", "!web/**"], "tailwindcss",
"ignore": ["drizzle-prod.config.ts"], "daisyui",
// Disable Drizzle plugin - it tries to load drizzle.config.ts which imports cloudflare:workers ],
"drizzle": false,
"ignoreDependencies": [
// Tailwindcss used via @tailwindcss/vite plugin
"tailwindcss",
"daisyui",
],
} }

View File

@ -3,7 +3,6 @@
export { export {
DEFAULT_LOCATION_CODE, DEFAULT_LOCATION_CODE,
LABS_LOCATION_OPTIONS, LABS_LOCATION_OPTIONS,
LOCATION_OPTIONS,
LOCATIONS, LOCATIONS,
getLanguageCode, getLanguageCode,
isLabsLocationCode, isLabsLocationCode,