services:

  caddy:
    container_name: caddy
    image: caddy:latest
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile
      - ./caddy/data:/data
      - ./caddy/config:/config
    environment:
      - TZ=Europe/Paris

  npm:
    container_name: npm
    image: jc21/nginx-proxy-manager:latest
    restart: unless-stopped
    ports:
      - 82:80
      - 445:443
      - 81:81
    volumes:
      - ./npm/data:/data
      - ./npm/letsencrypt:/etc/letsencrypt
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  portainer:
    image: portainer/portainer-ce:latest
    container_name: portainer
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./portainer/data:/data
    ports:
      - 9443:9443
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    restart: unless-stopped
    environment:
      - LOG_LEVEL=info
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  prowlarr:
    image: lscr.io/linuxserver/prowlarr:develop
    container_name: prowlarr
    restart: unless-stopped
    volumes:
      - ./prowlarr/config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  radarr:
    image: lscr.io/linuxserver/radarr:latest
    container_name: radarr
    restart: unless-stopped
    volumes:
      - ./radarr/config:/config
      - ./downloads:/downloads
      - /opt/docker/md:/md
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    restart: unless-stopped
    volumes:
      - ./sonarr/config:/config
      - ./downloads:/downloads
      - /opt/docker/md:/md
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  lidarr:
    image: lscr.io/linuxserver/lidarr:latest
    container_name: lidarr
    restart: unless-stopped
    volumes:
      - ./lidarr/config:/config
      - ./downloads:/downloads
      - /opt/docker/md:/md
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    restart: unless-stopped
    volumes:
      - ./qbittorrent/config:/config
      - ./downloads:/downloads
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
    ports:
      - 6881:6881
      - 6881:6881/udp

  wizarr:
    image: ghcr.io/wizarrrr/wizarr:latest
    container_name: wizarr
    restart: unless-stopped
    volumes:
      - ./wizarr/data:/data/database
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
    ports:
      - 5690:5690

  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped
    volumes:
      - ./jellyfin/config:/config
      - ./jellyfin/cache:/cache
      - /opt/docker/md:/md
    ports:
      - 8096:8096
    environment:
      - JELLYFIN_PublishedServerUrl=https://media.jujub.eu
      - JELLYFIN_CACHE_DIR=/cache
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
    group_add:
      - video
    devices:
      - /dev/dri:/dev/dri

  jellyseerr:
    image: fallenbagel/jellyseerr:latest
    container_name: jellyseerr
    restart: unless-stopped
    volumes:
      - ./jellyseerr/config:/app/config
    environment:
      - LOG_LEVEL=debug
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  filebrowser:
    image: hurlenko/filebrowser
    container_name: filebrowser
    restart: unless-stopped
    ports:
      - 8082:8080
    volumes:
      - /opt/docker:/data
      - ./filebrowser/config:/config
    user: 1000:1000
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  navidrome:
    image: deluan/navidrome:latest
    container_name: navidrome
    restart: unless-stopped
    ports:
      - 4533:4533
    volumes:
      - /opt/docker/navidrome/data:/data
      - /opt/docker/md/au/musique:/music:ro
      - /opt/docker/md/au/kids:/kids:ro
      - /opt/docker/md/au/ambient:/ambient:ro
    user: 1000:1000 # should be owner of volumes
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - ND_SCANSCHEDULE=1h
      - ND_LOGLEVEL=info
      - ND_SESSIONTIMEOUT=24h
      - ND_SPOTIFY_ID=42914d2dab9744f8ad8b71889f3ad923
      - ND_SPOTIFY_SECRET=e444be438e8549e5846c8489000f4224

  n8n:
    image: docker.n8n.io/n8nio/n8n
    container_name: n8n
    restart: unless-stopped
    ports:
      - 5678:5678
    volumes:
      - /opt/docker/n8n:/home/node/.n8n
    user: 1000:1000 # should be owner of volumes
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - N8N_HOST=n8n.rainbowroad.xyz
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://n8n.jujub.eu/
      - GENERIC_TIMEZONE=Europe/Paris

  jellystat-db:
    image: postgres:15.2
    shm_size: 1gb
    container_name: jellystat-db
    restart: unless-stopped
    environment:
      - POSTGRES_USER=jellystat
      - POSTGRES_PASSWORD=jellystat#Pass@25
    volumes:
      - /opt/docker/jellystat/db:/var/lib/postgresql/data

  jellystat:
    image: cyfershepard/jellystat:latest
    container_name: jellystat
    restart: unless-stopped
    environment:
      - POSTGRES_USER=jellystat
      - POSTGRES_PASSWORD=jellystat#Pass@25
      - POSTGRES_IP=jellystat-db
      - POSTGRES_PORT=5432
      - JWT_SECRET=jellystat#JWT#Secret@25
      - TZ=Europe/Paris
      - PUID=1000
      - PGID=1000
    volumes:
      - /opt/docker/jellystat/backup-data:/app/backend/backup-data
    ports:
      - 3000:3000
    depends_on:
      - jellystat-db

  kavita:
    image: jvmilazz0/kavita:latest
    container_name: kavita
    restart: unless-stopped
    ports:
      - 5000:5000
    volumes:
      - /opt/docker/kavita/config:/kavita/config
      - /opt/docker/md/bi/bd:/bd
      - /opt/docker/md/bi/comic:/comic
      - /opt/docker/md/bi/manga:/manga
      - /opt/docker/md/bi/ebook:/ebook
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:latest
    container_name: audiobookshelf
    restart: unless-stopped
    ports:
      - 8989:80
    volumes:
      - /opt/docker/audiobookshelf/config:/config
      - /opt/docker/audiobookshelf/metadata:/metadata
      - /opt/docker/md/au/audiobook:/audiobooks
      - /opt/docker/md/au/podcast:/podcasts
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  deemix:
    image: ghcr.io/bambanah/deemix:latest
    container_name: deemix
    restart: unless-stopped
    ports:
      - 6595:6595
    volumes:
      - ./deemix/config:/config
      - ./downloads/deemix:/downloads
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  picard:
    image: mikenye/picard
    container_name: picard
    restart: unless-stopped
    ports:
      - 5800:5800
    volumes:
      - ./picard/config:/config:rw
      - ./md/au:/storage:rw
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

  calibre-web-automated:
    image: crocodilestick/calibre-web-automated:latest
    container_name: calibre-web-automated
    restart: unless-stopped
    ports:
      - 8083:8083
    volumes:
      - /opt/docker/calibre-web-automated/config:/config
      - /opt/docker/calibre-web-automated/plugins:/config/.config/calibre/plugins
      - /opt/docker/md/bi/ebook/downloads:/cwa-book-ingest
      - /opt/docker/md/bi/ebook/library:/calibre-library
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - CWA_PORT_OVERRIDE=8083

  remotely:
    image: immybot/remotely:latest
    container_name: remotely
    volumes:
      - ./remotely:/app/AppData
    restart: unless-stopped
    ports:
      - 5005:5000
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - ASPNETCORE_HTTP_PORTS=5000
      - Remotely_ApplicationOptions__DbProvider=SQLite
      - Remotely_ConnectionStrings__SQLite=Data Source=/app/AppData/Remotely.db

  ygege:
    image: uwucode/ygege:latest
    container_name: ygege
    restart: unless-stopped
    ports:
      - "8715:8715"
    volumes:
      - ./ygege/config:/config
    environment:
      YGG_USERNAME: "londubat"
      YGG_PASSWORD: "5jb~bkHm@^7d"
      LOG_LEVEL: "debug"

  termix:
    image: ghcr.io/lukegus/termix:latest
    container_name: termix
    restart: unless-stopped
    ports:
      - "8089:8080"
    volumes:
      - ./termix:/app/data
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
