version: '3.8'

services:
  tmdb-addon:
    image: ghcr.io/mrcanelas/tmdb-addon:latest
    container_name: tmdb-addon
    restart: unless-stopped
    ports:
      - "3232:3232"
    environment:
      - PORT=3232
      - TMDB_API=2a8a329158430d4f0df17abdffa643dc
      - FANART_API=2e2760d22edbaaeaa83e7509573082ef
      - HOST_NAME=https://tmdb-stremio.soalic413vmlp.fr
      - MONGODB_URI=mongodb://tmdb-db:27017/tmdb
      - META_TTL=604800
      - CATALOG_TTL=86400
      - NO_CACHE=false
    depends_on:
      - tmdb-db

  tmdb-db:
    image: mongo:6
    container_name: tmdb-db
    restart: unless-stopped
    volumes:
      - tmdb-db:/data/db
    healthcheck:
      test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
      interval: 10s
      timeout: 10s
      retries: 5
      start_period: 40s

volumes:
  tmdb-db:


