chore: remove kokoro from compose, make host ports env-configurable
- Drop kokoro service (deployed separately); update default KOKORO_URL to kokoro.kalekber.cc - Expose host ports via env vars (MINIO_PORT, MINIO_CONSOLE_PORT, POCKETBASE_PORT, BROWSERLESS_PORT, SCRAPER_PORT) for preview deployments
This commit is contained in:
@@ -11,8 +11,8 @@ services:
|
|||||||
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-admin}"
|
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-admin}"
|
||||||
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-changeme123}"
|
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-changeme123}"
|
||||||
ports:
|
ports:
|
||||||
- "9000:9000" # S3 API
|
- "${MINIO_PORT:-9000}:9000" # S3 API
|
||||||
- "9001:9001" # Web console
|
- "${MINIO_CONSOLE_PORT:-9001}:9001" # Web console
|
||||||
volumes:
|
volumes:
|
||||||
- minio_data:/data
|
- minio_data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -46,7 +46,7 @@ services:
|
|||||||
container_name: libnovel-pocketbase
|
container_name: libnovel-pocketbase
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8090:8090"
|
- "${POCKETBASE_PORT:-8090}:8090"
|
||||||
volumes:
|
volumes:
|
||||||
- pb_data:/pb/pb_data
|
- pb_data:/pb/pb_data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -73,7 +73,7 @@ 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:
|
||||||
- "3030:3000"
|
- "${BROWSERLESS_PORT:-3030}:3000"
|
||||||
# Shared memory is required for Chrome.
|
# Shared memory is required for Chrome.
|
||||||
shm_size: "2gb"
|
shm_size: "2gb"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -82,21 +82,6 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
# ─── Kokoro-FastAPI (TTS) ────────────────────────────────────────────────────
|
|
||||||
# CPU image; swap for ghcr.io/remsky/kokoro-fastapi-gpu:latest on NVIDIA hosts.
|
|
||||||
# Models are baked in — no volume mount required for the default voice set.
|
|
||||||
kokoro:
|
|
||||||
image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
|
|
||||||
container_name: libnovel-kokoro
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "8880:8880"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8880/health"]
|
|
||||||
interval: 15s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
|
|
||||||
# ─── Scraper ─────────────────────────────────────────────────────────────────
|
# ─── Scraper ─────────────────────────────────────────────────────────────────
|
||||||
scraper:
|
scraper:
|
||||||
build:
|
build:
|
||||||
@@ -105,8 +90,6 @@ services:
|
|||||||
container_name: libnovel-scraper
|
container_name: libnovel-scraper
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
kokoro:
|
|
||||||
condition: service_healthy
|
|
||||||
pocketbase:
|
pocketbase:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
minio:
|
minio:
|
||||||
@@ -124,7 +107,7 @@ services:
|
|||||||
SCRAPER_HTTP_ADDR: ":8080"
|
SCRAPER_HTTP_ADDR: ":8080"
|
||||||
LOG_LEVEL: "debug"
|
LOG_LEVEL: "debug"
|
||||||
# Kokoro-FastAPI TTS endpoint.
|
# Kokoro-FastAPI TTS endpoint.
|
||||||
KOKORO_URL: "${KOKORO_URL:-http://localhost:8880}"
|
KOKORO_URL: "${KOKORO_URL:-https://kokoro.kalekber.cc}"
|
||||||
KOKORO_VOICE: "${KOKORO_VOICE:-af_bella}"
|
KOKORO_VOICE: "${KOKORO_VOICE:-af_bella}"
|
||||||
# MinIO / S3 object storage
|
# MinIO / S3 object storage
|
||||||
MINIO_ENDPOINT: "minio:9000"
|
MINIO_ENDPOINT: "minio:9000"
|
||||||
@@ -138,7 +121,7 @@ services:
|
|||||||
POCKETBASE_ADMIN_EMAIL: "${POCKETBASE_ADMIN_EMAIL:-admin@libnovel.local}"
|
POCKETBASE_ADMIN_EMAIL: "${POCKETBASE_ADMIN_EMAIL:-admin@libnovel.local}"
|
||||||
POCKETBASE_ADMIN_PASSWORD: "${POCKETBASE_ADMIN_PASSWORD:-changeme123}"
|
POCKETBASE_ADMIN_PASSWORD: "${POCKETBASE_ADMIN_PASSWORD:-changeme123}"
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "${SCRAPER_PORT:-8080}:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- static_books:/app/static/books
|
- static_books:/app/static/books
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ func run(log *slog.Logger) error {
|
|||||||
|
|
||||||
case "serve":
|
case "serve":
|
||||||
addr := envOr("SCRAPER_HTTP_ADDR", ":8080")
|
addr := envOr("SCRAPER_HTTP_ADDR", ":8080")
|
||||||
kokoroURL := envOr("KOKORO_URL", "")
|
kokoroURL := envOr("KOKORO_URL", "https://kokoro.kalekber.cc")
|
||||||
kokoroVoice := envOr("KOKORO_VOICE", "af_bella")
|
kokoroVoice := envOr("KOKORO_VOICE", "af_bella")
|
||||||
log.Info("starting HTTP server",
|
log.Info("starting HTTP server",
|
||||||
"addr", addr,
|
"addr", addr,
|
||||||
|
|||||||
Reference in New Issue
Block a user