# vim: set ft=yaml
name: 'nefarious'
services:
  app:
    image: 'lardbit/nefarious:latest'
    restart: 'always'

    environment:
      - 'DATABASE_URL=sqlite:////config/db.sqlite3'
      - 'REDIS_HOST=redis'
      - 'HOST_DOWNLOAD_PATH=/mnt/data1/media'
      - 'NEFARIOUS_USER={{ nefarious_admin_user }}'
      - 'NEFARIOUS_PASS={{ nefarious_admin_pass }}'
      - 'CONFIG_PATH=/config'
    ports:
      - '8006:80'
    volumes:
      - '/mnt/data1/nefarious/nefarious:/config'

  celery:
    image: 'lardbit/nefarious:latest'
    restart: 'always'
    entrypoint: '/app/entrypoint-celery.sh'

    environment:
      - 'DATABASE_URL=sqlite:////config/db.sqlite3'
      - 'REDIS_HOST=redis'
      - 'CONFIG_PATH=/config'
      - 'NUM_CELERY_WORKERS=1'
    volumes:
      - '/mnt/data1/nefarious/nefarious:/config'

  redis:
    image: 'redis:6-alpine'
    restart: always

  jackett:
    image: 'linuxserver/jackett:latest'
    restart: always

    ports:
      - '8007:9117'
    volumes:
      - '/mnt/data1/nefarious/jackett:/config'

  transmission:
    image: 'linuxserver/transmission:4.0.5'
    restart: 'always'
    
    environment:
      - 'PUID=1000'
      - 'PGID=1000'
      - 'TZ=Europe/Brussels'
      - 'USER='
      - 'PASS='
    ports:
      - '8008:9091'
      - '51413:51413'
    volumes:
      - '/etc/nefarious/transmission-settings.json:/config/settings.json:ro'
      - '/mnt/data1/media:/downloads'
