chore(v2): add PocketBase and MinIO services to docker-compose
This commit is contained in:
@@ -1,6 +1,60 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# ─── MinIO (object storage for chapter .md files + audio cache) ─────────────
|
||||||
|
minio:
|
||||||
|
image: minio/minio:latest
|
||||||
|
container_name: libnovel-minio
|
||||||
|
restart: unless-stopped
|
||||||
|
command: server /data --console-address ":9001"
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-admin}"
|
||||||
|
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-changeme123}"
|
||||||
|
ports:
|
||||||
|
- "9000:9000" # S3 API
|
||||||
|
- "9001:9001" # Web console
|
||||||
|
volumes:
|
||||||
|
- minio_data:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mc", "ready", "local"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
# ─── MinIO bucket initialisation ─────────────────────────────────────────────
|
||||||
|
# Runs once to create the default buckets and then exits.
|
||||||
|
minio-init:
|
||||||
|
image: minio/mc:latest
|
||||||
|
container_name: libnovel-minio-init
|
||||||
|
depends_on:
|
||||||
|
minio:
|
||||||
|
condition: service_healthy
|
||||||
|
entrypoint: >
|
||||||
|
/bin/sh -c "
|
||||||
|
mc alias set local http://minio:9000 $${MINIO_ROOT_USER:-admin} $${MINIO_ROOT_PASSWORD:-changeme123};
|
||||||
|
mc mb --ignore-existing local/libnovel-chapters;
|
||||||
|
mc mb --ignore-existing local/libnovel-audio;
|
||||||
|
echo 'buckets ready';
|
||||||
|
"
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-admin}"
|
||||||
|
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-changeme123}"
|
||||||
|
|
||||||
|
# ─── PocketBase (auth + structured data: books, chapters index, ranking, progress) ──
|
||||||
|
pocketbase:
|
||||||
|
image: ghcr.io/muchobien/pocketbase:latest
|
||||||
|
container_name: libnovel-pocketbase
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8090:8090"
|
||||||
|
volumes:
|
||||||
|
- pb_data:/pb/pb_data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-qO-", "http://localhost:8090/api/health"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
# ─── Browserless ────────────────────────────────────────────────────────────
|
# ─── Browserless ────────────────────────────────────────────────────────────
|
||||||
browserless:
|
browserless:
|
||||||
image: ghcr.io/browserless/chromium:latest
|
image: ghcr.io/browserless/chromium:latest
|
||||||
@@ -53,6 +107,10 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
kokoro:
|
kokoro:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
pocketbase:
|
||||||
|
condition: service_healthy
|
||||||
|
minio:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
BROWSERLESS_URL: "http://browserless:3000"
|
BROWSERLESS_URL: "http://browserless:3000"
|
||||||
BROWSERLESS_TOKEN: "${BROWSERLESS_TOKEN:-}"
|
BROWSERLESS_TOKEN: "${BROWSERLESS_TOKEN:-}"
|
||||||
@@ -68,6 +126,17 @@ services:
|
|||||||
# Kokoro-FastAPI TTS endpoint.
|
# Kokoro-FastAPI TTS endpoint.
|
||||||
KOKORO_URL: "${KOKORO_URL:-http://localhost:8880}"
|
KOKORO_URL: "${KOKORO_URL:-http://localhost:8880}"
|
||||||
KOKORO_VOICE: "${KOKORO_VOICE:-af_bella}"
|
KOKORO_VOICE: "${KOKORO_VOICE:-af_bella}"
|
||||||
|
# MinIO / S3 object storage
|
||||||
|
MINIO_ENDPOINT: "minio:9000"
|
||||||
|
MINIO_ACCESS_KEY: "${MINIO_ROOT_USER:-admin}"
|
||||||
|
MINIO_SECRET_KEY: "${MINIO_ROOT_PASSWORD:-changeme123}"
|
||||||
|
MINIO_USE_SSL: "false"
|
||||||
|
MINIO_BUCKET_CHAPTERS: "${MINIO_BUCKET_CHAPTERS:-libnovel-chapters}"
|
||||||
|
MINIO_BUCKET_AUDIO: "${MINIO_BUCKET_AUDIO:-libnovel-audio}"
|
||||||
|
# PocketBase
|
||||||
|
POCKETBASE_URL: "http://pocketbase:8090"
|
||||||
|
POCKETBASE_ADMIN_EMAIL: "${POCKETBASE_ADMIN_EMAIL:-admin@libnovel.local}"
|
||||||
|
POCKETBASE_ADMIN_PASSWORD: "${POCKETBASE_ADMIN_PASSWORD:-changeme123}"
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -80,3 +149,5 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
static_books:
|
static_books:
|
||||||
|
minio_data:
|
||||||
|
pb_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user