chore: update Browserless port references from 3000 to 3030
Update all default URLs, port mappings, healthcheck endpoints, Dockerfile ENV defaults, and integration test run instructions to use port 3030.
This commit is contained in:
@@ -47,7 +47,7 @@ cd scraper && go test ./...
|
|||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
|----------|-------------|---------|
|
|----------|-------------|---------|
|
||||||
| BROWSERLESS_URL | Browserless Chrome endpoint | http://localhost:3000 |
|
| BROWSERLESS_URL | Browserless Chrome endpoint | http://localhost:3030 |
|
||||||
| BROWSERLESS_STRATEGY | content \| scrape \| cdp | content |
|
| BROWSERLESS_STRATEGY | content \| scrape \| cdp | content |
|
||||||
| SCRAPER_WORKERS | Chapter goroutines | NumCPU |
|
| SCRAPER_WORKERS | Chapter goroutines | NumCPU |
|
||||||
| SCRAPER_STATIC_ROOT | Output directory | ./static/books |
|
| SCRAPER_STATIC_ROOT | Output directory | ./static/books |
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ services:
|
|||||||
# Optional webhook URL for Browserless error alerts.
|
# Optional webhook URL for Browserless error alerts.
|
||||||
ERROR_ALERT_URL: "${ERROR_ALERT_URL:-}"
|
ERROR_ALERT_URL: "${ERROR_ALERT_URL:-}"
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3030:3000"
|
||||||
# Shared memory is required for Chrome.
|
# Shared memory is required for Chrome.
|
||||||
shm_size: "2gb"
|
shm_size: "2gb"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://localhost:3000/json/version"]
|
test: ["CMD", "wget", "-qO-", "http://localhost:3030/json/version"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -54,7 +54,7 @@ services:
|
|||||||
kokoro:
|
kokoro:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
BROWSERLESS_URL: "http://browserless:3000"
|
BROWSERLESS_URL: "http://browserless:3030"
|
||||||
BROWSERLESS_TOKEN: "${BROWSERLESS_TOKEN:-}"
|
BROWSERLESS_TOKEN: "${BROWSERLESS_TOKEN:-}"
|
||||||
# content | scrape | cdp | direct — swap to test different strategies.
|
# content | scrape | cdp | direct — swap to test different strategies.
|
||||||
BROWSERLESS_STRATEGY: "${BROWSERLESS_STRATEGY:-direct}"
|
BROWSERLESS_STRATEGY: "${BROWSERLESS_STRATEGY:-direct}"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ RUN chown -R scraper:scraper /app
|
|||||||
USER scraper
|
USER scraper
|
||||||
|
|
||||||
# ── Configuration ─────────────────────────────────────────────────────────────
|
# ── Configuration ─────────────────────────────────────────────────────────────
|
||||||
ENV BROWSERLESS_URL=http://browserless:3000
|
ENV BROWSERLESS_URL=http://browserless:3030
|
||||||
ENV BROWSERLESS_STRATEGY=content
|
ENV BROWSERLESS_STRATEGY=content
|
||||||
ENV SCRAPER_WORKERS=0
|
ENV SCRAPER_WORKERS=0
|
||||||
ENV SCRAPER_STATIC_ROOT=/app/static/books
|
ENV SCRAPER_STATIC_ROOT=/app/static/books
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
//
|
//
|
||||||
// Environment variables:
|
// Environment variables:
|
||||||
//
|
//
|
||||||
// BROWSERLESS_URL Browserless base URL (default: http://localhost:3000)
|
// BROWSERLESS_URL Browserless base URL (default: http://localhost:3030)
|
||||||
// BROWSERLESS_TOKEN Browserless API token (default: "")
|
// BROWSERLESS_TOKEN Browserless API token (default: "")
|
||||||
// BROWSERLESS_STRATEGY content | scrape | cdp (default: content)
|
// BROWSERLESS_STRATEGY content | scrape | cdp (default: content)
|
||||||
// BROWSERLESS_MAX_CONCURRENT Max simultaneous browser sessions (default: 5)
|
// BROWSERLESS_MAX_CONCURRENT Max simultaneous browser sessions (default: 5)
|
||||||
@@ -68,7 +68,7 @@ func run(log *slog.Logger) error {
|
|||||||
cmd := strings.ToLower(args[0])
|
cmd := strings.ToLower(args[0])
|
||||||
|
|
||||||
browserCfg := browser.Config{
|
browserCfg := browser.Config{
|
||||||
BaseURL: envOr("BROWSERLESS_URL", "http://localhost:3000"),
|
BaseURL: envOr("BROWSERLESS_URL", "http://localhost:3030"),
|
||||||
Token: envOr("BROWSERLESS_TOKEN", ""),
|
Token: envOr("BROWSERLESS_TOKEN", ""),
|
||||||
}
|
}
|
||||||
browserCfg.MaxConcurrent = 5
|
browserCfg.MaxConcurrent = 5
|
||||||
@@ -199,7 +199,7 @@ Commands:
|
|||||||
serve Start HTTP server (POST /scrape, POST /scrape/book)
|
serve Start HTTP server (POST /scrape, POST /scrape/book)
|
||||||
|
|
||||||
Environment variables:
|
Environment variables:
|
||||||
BROWSERLESS_URL Browserless base URL (default: http://localhost:3000)
|
BROWSERLESS_URL Browserless base URL (default: http://localhost:3030)
|
||||||
BROWSERLESS_TOKEN API token (default: "")
|
BROWSERLESS_TOKEN API token (default: "")
|
||||||
BROWSERLESS_STRATEGY content|scrape|cdp|direct (default: direct)
|
BROWSERLESS_STRATEGY content|scrape|cdp|direct (default: direct)
|
||||||
BROWSERLESS_URL_STRATEGY Strategy for URL retrieval (default: content)
|
BROWSERLESS_URL_STRATEGY Strategy for URL retrieval (default: content)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
// Config holds the connection parameters for a Browserless instance.
|
// Config holds the connection parameters for a Browserless instance.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
// BaseURL is the HTTP base URL, e.g. "http://localhost:3000".
|
// BaseURL is the HTTP base URL, e.g. "http://localhost:3030".
|
||||||
BaseURL string
|
BaseURL string
|
||||||
// Token is the optional API token (BROWSERLESS_TOKEN env var).
|
// Token is the optional API token (BROWSERLESS_TOKEN env var).
|
||||||
Token string
|
Token string
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
// Run them with:
|
// Run them with:
|
||||||
//
|
//
|
||||||
// BROWSERLESS_URL=http://localhost:3000 \
|
// BROWSERLESS_URL=http://localhost:3030 \
|
||||||
// BROWSERLESS_TOKEN=your-token \ # omit if auth is disabled
|
// BROWSERLESS_TOKEN=your-token \ # omit if auth is disabled
|
||||||
// go test -v -tags integration -timeout 120s \
|
// go test -v -tags integration -timeout 120s \
|
||||||
// github.com/libnovel/scraper/internal/browser
|
// github.com/libnovel/scraper/internal/browser
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
//
|
//
|
||||||
// Run with:
|
// Run with:
|
||||||
//
|
//
|
||||||
// BROWSERLESS_URL=http://localhost:3000 \
|
// BROWSERLESS_URL=http://localhost:3030 \
|
||||||
// BROWSERLESS_TOKEN=your-token \ # omit if auth is disabled
|
// BROWSERLESS_TOKEN=your-token \ # omit if auth is disabled
|
||||||
// go test -v -tags integration -timeout 600s \
|
// go test -v -tags integration -timeout 600s \
|
||||||
// github.com/libnovel/scraper/internal/novelfire
|
// github.com/libnovel/scraper/internal/novelfire
|
||||||
|
|||||||
Reference in New Issue
Block a user