From b090330e833b9698c1c52cebde47bb034e51b49e Mon Sep 17 00:00:00 2001 From: Thomas Willems Date: Sat, 16 Aug 2025 16:00:42 +0200 Subject: [PATCH] feat: add stremio-ai-companion (#45) --- .env | 1 + apps/authelia/compose.yaml | 1 + apps/cloudflare-ddns/compose.yaml | 1 + apps/stremio-ai-companion/.env | 22 ++++++++++++++ apps/stremio-ai-companion/compose.yaml | 41 ++++++++++++++++++++++++++ compose.yaml | 1 + 6 files changed, 67 insertions(+) create mode 100644 apps/stremio-ai-companion/.env create mode 100644 apps/stremio-ai-companion/compose.yaml diff --git a/.env b/.env index c04e752..6e0d6a7 100644 --- a/.env +++ b/.env @@ -179,6 +179,7 @@ SPEEDTEST_TRACKER_HOSTNAME=speedtest-tracker.${DOMAIN} STIRLING_PDF_HOSTNAME=stirling.${DOMAIN} STREAMYSTATS_HOSTNAME=streamystats.${DOMAIN} STREMIO_ACCOUNT_BOOTSTRAPPER_HOSTNAME=stremio-account-bootstrapper.${DOMAIN?} +STREMIO_AI_COMPANION_HOSTNAME=ai-companion.${DOMAIN?} STREMIO_AI_SEARCH_HOSTNAME=ai-search.${DOMAIN?} STREMIO_CATALOG_PROVIDERS_HOSTNAME=stremio-catalogues.${DOMAIN} STREMIO_JACKETT_HOSTNAME=stremio-jackett.${DOMAIN} diff --git a/apps/authelia/compose.yaml b/apps/authelia/compose.yaml index 913dae3..57d7348 100644 --- a/apps/authelia/compose.yaml +++ b/apps/authelia/compose.yaml @@ -28,6 +28,7 @@ services: ${MEDIAFUSION_HOSTNAME}, ${JACKETTIO_HOSTNAME}, ${PLEXIO_HOSTNAME}, + ${STREMIO_AI_COMPANION_HOSTNAME}, ${STREMIO_AI_SEARCH_HOSTNAME}, ${STREMIO_JACKETT_HOSTNAME}, ${STREMIO_LETTERBOXD_HOSTNAME}, diff --git a/apps/cloudflare-ddns/compose.yaml b/apps/cloudflare-ddns/compose.yaml index f3892f9..a9e4cc2 100644 --- a/apps/cloudflare-ddns/compose.yaml +++ b/apps/cloudflare-ddns/compose.yaml @@ -78,6 +78,7 @@ services: ${STIRLING_PDF_HOSTNAME}, ${STREAMYSTATS_HOSTNAME}, ${STREMIO_ACCOUNT_BOOTSTRAPPER_HOSTNAME}, + ${STREMIO_AI_COMPANION}, ${STREMIO_AI_SEARCH_HOSTNAME}, ${STREMIO_CATALOG_PROVIDERS_HOSTNAME}, ${STREMIO_JACKETT_HOSTNAME}, diff --git a/apps/stremio-ai-companion/.env b/apps/stremio-ai-companion/.env new file mode 100644 index 0000000..10c6062 --- /dev/null +++ b/apps/stremio-ai-companion/.env @@ -0,0 +1,22 @@ +# Logging +# LOG_LEVEL=WARN + +# --- Security --- +# CRITICAL: Secret key for encrypting addon configuration. +# Generate one using: +# Linux/macOS: openssl rand -hex 32 +# Windows (PowerShell): -join ((0..31) | ForEach-Object { '{0:x2}' -f (Get-Random -Minimum 0 -Maximum 255) }) +# Or: [System.Guid]::NewGuid().ToString("N") + [System.Guid]::NewGuid().ToString("N") (ensure it's 64 chars) +ENCRYPTION_KEY= + +# Number of workers for the Uvicorn server. +# Adjust based on your server's CPU cores. +UVICORN_WORKERS=2 + +# Output catalogs for movies and series in addition to search +ENABLE_FEED_CATALOGS=true + +# Redis configuration +REDIS_HOST=stremio-ai-companion-redis +REDIS_PORT=6379 +REDIS_DB=0 \ No newline at end of file diff --git a/apps/stremio-ai-companion/compose.yaml b/apps/stremio-ai-companion/compose.yaml new file mode 100644 index 0000000..b89eb21 --- /dev/null +++ b/apps/stremio-ai-companion/compose.yaml @@ -0,0 +1,41 @@ +services: + stremio-ai-companion: + image: ghcr.io/willtho89/stremio-ai-companion:latest + container_name: stremio-ai-companion + restart: unless-stopped + env_file: + - .env + expose: + - 8000 + depends_on: + stremio-ai-companion-redis: + condition: service_healthy + labels: + - "traefik.enable=true" + - "traefik.http.routers.stremio-ai-companion.rule=Host(`${STREMIO_AI_COMPANION_HOSTNAME?}`)" + - "traefik.http.routers.stremio-ai-companion.entrypoints=websecure" + - "traefik.http.routers.stremio-ai-companion.tls.certresolver=letsencrypt" + - "traefik.http.routers.stremio-ai-companion.middlewares=authelia@docker" + - "traefik.http.services.stremio-ai-companion.loadbalancer.server.port=8000" + - "traefik.http.middlewares.test-compress.compress=true" + profiles: + - stremio-ai-companion + - stremio + - all + + stremio-ai-companion-redis: + image: redis:latest + container_name: stremio-ai-companion-redis + restart: unless-stopped + volumes: + - ${DOCKER_DATA_DIR}/stremio-ai-companion/cache:/data + command: redis-server --appendonly yes --save 60 1 + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 10s + timeout: 5s + retries: 5 + profiles: + - stremio-ai-companion + - stremio + - all diff --git a/compose.yaml b/compose.yaml index 6e42cf9..44027e8 100644 --- a/compose.yaml +++ b/compose.yaml @@ -69,6 +69,7 @@ include: - apps/stirling-pdf/compose.yaml - apps/streamystats/compose.yaml - apps/stremio-account-bootstrapper/compose.yaml + - apps/stremio-ai-companion/compose.yaml - apps/stremio-ai-search/compose.yaml - apps/stremio-catalog-providers/compose.yaml - apps/stremio-jackett/compose.yaml