version: '3.8'

services:
  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    container_name: prowlarr
    environment:
      - PUID=1002
      - PGID=1002
      - TZ=Europe/Oslo
    volumes:
      - ../config/prowlarr:/config
    ports:
      - 9696:9696
    restart: unless-stopped
    networks:
      - homelab-net

  radarr:
    image: lscr.io/linuxserver/radarr:latest
    container_name: radarr
    environment:
      - PUID=1002
      - PGID=1002
      - TZ=Europe/Oslo
    volumes:
      - ../config/radarr:/config
      - ../media/movies:/movies
      - ../media/downloads:/downloads
    ports:
      - 7878:7878
    restart: unless-stopped
    networks:
      - homelab-net
    depends_on:
      - prowlarr

  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PUID=1002
      - PGID=1002
      - TZ=Europe/Oslo
    volumes:
      - ../config/sonarr:/config
      - ../media/tv:/tv
      - ../media/downloads:/downloads
    ports:
      - 8989:8989
    restart: unless-stopped
    networks:
      - homelab-net
    depends_on:
      - prowlarr

  couchdb:
    image: couchdb:3.3.3
    container_name: obsidian-couchdb
    environment:
      - COUCHDB_USER=${COUCHDB_USER}
      - COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
    volumes:
      - ./obsidian-livesync/data:/opt/couchdb/data
      - ./obsidian-livesync/config/local.ini:/opt/couchdb/etc/local.d/local.ini
    ports:
      - 5984:5984
    restart: unless-stopped
    networks:
      - homelab-net

networks:
  homelab-net:
    driver: bridge
