use standard Maps worker jobs API without key
This commit is contained in:
@@ -19,19 +19,22 @@ docker compose up -d --build
|
||||
```
|
||||
|
||||
Open `http://SERVER:8000` for ProspectOS. The Maps worker is available on
|
||||
`http://SERVER:8081` for its one-time setup.
|
||||
`http://SERVER:8081` if you want to inspect its native Web UI.
|
||||
|
||||
### Connect the Maps worker
|
||||
### How the worker connects
|
||||
|
||||
1. Open port `8081` in a browser on your private network.
|
||||
2. Use the worker's admin screen to create an API key for this local app.
|
||||
3. Put that key in `.env` as `GMAPS_API_KEY=...`.
|
||||
4. Restart the app with `docker compose up -d --build` and reload ProspectOS.
|
||||
No Google Cloud API key is required. The bundled standard worker exposes a
|
||||
local REST API on the Docker network, and ProspectOS calls it directly.
|
||||
|
||||
The app calls `/api/v1/scrape` to queue a job and `/api/v1/jobs/{id}` to poll
|
||||
it. Jobs are deliberately asynchronous because a Maps scrape can take several
|
||||
minutes. A run that loses its worker connection is shown as failed with a
|
||||
specific error rather than remaining stuck forever.
|
||||
The app uses `/api/v1/jobs` to queue a search, polls `/api/v1/jobs/{id}`, and
|
||||
downloads `/api/v1/jobs/{id}/download` when the job finishes. Jobs are
|
||||
deliberately asynchronous because a Maps scrape can take several minutes.
|
||||
|
||||
Only set `GMAPS_API_MODE=saas` and `GMAPS_API_KEY=...` if you deliberately
|
||||
replace the bundled worker with gosom's optional SaaS edition.
|
||||
|
||||
A run that loses its worker connection is shown as failed with a specific
|
||||
error rather than remaining stuck forever.
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -39,10 +42,11 @@ specific error rather than remaining stuck forever.
|
||||
|---|---:|---|
|
||||
| `HOST_PORT` | `8000` | Host port for ProspectOS |
|
||||
| `GMAPS_HOST_PORT` | `8081` | Host port for the Maps worker admin UI |
|
||||
| `GMAPS_API_KEY` | empty | API key created in the Maps worker admin UI |
|
||||
| `GMAPS_API_MODE` | `standard` | `standard` for the bundled worker; `saas` only for the optional SaaS API |
|
||||
| `GMAPS_API_KEY` | empty | Not required in standard mode; only used in SaaS mode |
|
||||
| `GMAPS_REQUEST_TIMEOUT` | `300` | Per-job scraper timeout in seconds |
|
||||
| `GMAPS_POLL_SECONDS` | `2` | Poll interval while a job is running |
|
||||
| `DISCOVERY_BACKEND` | `gmaps` when `GMAPS_URL` is set | Set to `browser` only for the old public-search fallback |
|
||||
| `DISCOVERY_BACKEND` | `gmaps` when `GMAPS_URL` is set | Set to `browser` only for the bounded public-search fallback |
|
||||
|
||||
The app stores its catalogue in the `prospect_data` Docker volume. The worker
|
||||
stores its own job data in `gmaps_data`; keep both volumes if you want to retain
|
||||
|
||||
Reference in New Issue
Block a user