From da06ff5f9a6fdeb85f739ed81f2dc58cb003cc9d Mon Sep 17 00:00:00 2001 From: Viren070 Date: Fri, 18 Jul 2025 00:52:15 +0100 Subject: [PATCH] feat: add tmdb collections --- .env | 1 + apps/authelia/compose.yaml | 1 + apps/cloudflare-ddns/compose.yaml | 1 + apps/tmdb-collections/.env | 8 +++++ apps/tmdb-collections/compose.yaml | 54 ++++++++++++++++++++++++++++++ compose.yaml | 1 + 6 files changed, 66 insertions(+) create mode 100644 apps/tmdb-collections/.env create mode 100644 apps/tmdb-collections/compose.yaml diff --git a/.env b/.env index e705439..9965c85 100644 --- a/.env +++ b/.env @@ -183,6 +183,7 @@ STREMTHRU_HOSTNAME=stremthru.${DOMAIN} TAUTULLI_HOSTNAME=tautulli.${DOMAIN} THE_LOUNGE_HOSTNAME=thelounge.${DOMAIN} TMDB_ADDON_HOSTNAME=tmdb.${DOMAIN} +TMDB_COLLECTIONS_HOSTNAME=tmdb-collections.${DOMAIN} TORBOX_MANAGER_HOSTNAME=tbm.${DOMAIN} TRAEFIK_HOSTNAME=traefik.${DOMAIN} UPTIME_KUMA_HOSTNAME=status.${DOMAIN} diff --git a/apps/authelia/compose.yaml b/apps/authelia/compose.yaml index 37aa0fc..f2a6b95 100644 --- a/apps/authelia/compose.yaml +++ b/apps/authelia/compose.yaml @@ -35,6 +35,7 @@ services: ${STREMIO_CATALOG_PROVIDERS_HOSTNAME}, ${STREMIO_TRAKT_ADDON_HOSTNAME}, ${TMDB_ADDON_HOSTNAME}, + ${TMDB_COLLECTIONS_HOSTNAME}, ${WEBSTREAMR_HOSTNAME} labels: - "traefik.enable=true" diff --git a/apps/cloudflare-ddns/compose.yaml b/apps/cloudflare-ddns/compose.yaml index 28d416e..6b82fa7 100644 --- a/apps/cloudflare-ddns/compose.yaml +++ b/apps/cloudflare-ddns/compose.yaml @@ -82,6 +82,7 @@ services: ${TAUTULLI_HOSTNAME}, ${THE_LOUNGE_HOSTNAME}, ${TMDB_ADDON_HOSTNAME}, + ${TMDB_COLLECTIONS_HOSTNAME}, ${TORBOX_MANAGER_HOSTNAME}, ${TRAEFIK_HOSTNAME}, ${UPTIME_KUMA_HOSTNAME}, diff --git a/apps/tmdb-collections/.env b/apps/tmdb-collections/.env new file mode 100644 index 0000000..edc34ce --- /dev/null +++ b/apps/tmdb-collections/.env @@ -0,0 +1,8 @@ +# Fanart.tv API key - Get yours at https://fanart.tv/get-an-api-key/ +FANART_API_KEY= + +# TMDB API key - Get yours at https://www.themoviedb.org/settings/api +TMDB_API_KEY= + +# New Relic license key - probably not required +NEW_RELIC_LICENSE_KEY=your_new_relic_license_key_here diff --git a/apps/tmdb-collections/compose.yaml b/apps/tmdb-collections/compose.yaml new file mode 100644 index 0000000..64839be --- /dev/null +++ b/apps/tmdb-collections/compose.yaml @@ -0,0 +1,54 @@ +services: + tmdb-collections: + image: tmdb-collections + container_name: tmdb-collections + restart: unless-stopped + build: + context: https://github.com/youchi1/tmdb-collections.git + dockerfile_inline: | + FROM node:22.17-alpine + WORKDIR /app + + # Copy package files first for better Docker layer caching + COPY package*.json ./ + + # Install production dependencies only + RUN npm ci --omit=dev --ignore-scripts && \ + npm cache clean --force + + # Copy application files + COPY Images ./Images + COPY Public ./Public + COPY lib ./lib + COPY index.js server.js newrelic.js ./ + + ENV NODE_ENV=production + + ENTRYPOINT ["npm", "start"] + expose: + - 7000 + env_file: + - .env + labels: + - "traefik.enable=true" + - "traefik.http.routers.tmdb-collections.rule=Host(`${TMDB_COLLECTIONS_HOSTNAME?}`)" + - "traefik.http.routers.tmdb-collections.entrypoints=websecure" + - "traefik.http.routers.tmdb-collections.tls.certresolver=letsencrypt" + - "traefik.http.services.tmdb-collections.loadbalancer.server.port=7000" + - "traefik.http.routers.tmdb-collections.middlewares=authelia@docker" + healthcheck: + test: + [ + "CMD", + "wget", + "--quiet", + "--tries=1", + "--spider", + "http://localhost:7000/manifest.json", + ] + interval: 30s + timeout: 10s + retries: 3 + profiles: + - tmdb-collections + - all \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 6933006..cb5f4a5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -73,6 +73,7 @@ include: - apps/tautulli/compose.yaml - apps/thelounge/compose.yaml - apps/tmdb-addon/compose.yaml + - apps/tmdb-collections/compose.yaml - apps/torbox-manager/compose.yaml - apps/torbox-media-center/compose.yaml - apps/traefik/compose.yaml