jazzman123456

Bitmagnet-Docker-Compose

Jan 16th, 2025 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.27 KB | Source Code | 0 0
  1. services:
  2.  #
  3.   # Bitmagnet - Torrent Crawler
  4.   #
  5.   bitmagnet:
  6.     container_name: bitmagnet
  7.     image: ghcr.io/bitmagnet-io/bitmagnet:latest
  8.     volumes:
  9.      - ${USERDIR}/bitmagnet/config/:/root/.config/bitmagnet/
  10.       # Mount data folder (currently only used for logs when file rotation is enabled):
  11.       - ${USERDIR}/bitmagnet/data/bitmagnet:/root/.local/share/bitmagnet
  12.     restart: unless-stopped
  13.     environment:
  14.      # Enable logging to rotating files for ingest to Loki:
  15.       - LOG_FILE_ROTATOR_ENABLED=true
  16.       - POSTGRES_HOST=postgres
  17.       - POSTGRES_PASSWORD=postgres
  18.       - TMDB_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  19.       # - CLASSIFIER_WORKFLOW=custom
  20.       # - CLASSIFIER_DELETE_XXX=true # auto-delete all adult content
  21.       # - CLASSIFIER_DELETE_SOFTWARE=true # auto-delete all software content
  22.       # - CLASSIFIER_DELETE_COMIC=true # auto-delete all comic content      
  23.     network_mode: service:gluetun
  24.     depends_on:
  25.       postgres:
  26.         condition: service_healthy
  27.     command:
  28.      - worker
  29.       - run
  30.       # Run all workers:
  31.       - --all
  32.       # Or enable individual workers:
  33.       # - --keys=http_server
  34.       # - --keys=queue_server
  35.       # - --keys=dht_crawler
  36.   #
  37.   # Gluetun - VPN Client for Bitmagnet
  38.   #
  39.   gluetun:
  40.     container_name: bitmagnet-gluetun
  41.     image: qmcgaw/gluetun:latest
  42.     cap_add:
  43.      - NET_ADMIN
  44.     ports:
  45.      # The bitmagnet ports must be exposed by the gluetun container:
  46.       - "3333:3333"
  47.       # BitTorrent ports:
  48.       - "3334:3334/tcp"
  49.       - "3334:3334/udp"
  50.     environment:
  51.      # Put your personal gluetun/VPN account config and credentials here:
  52.       # (See https://github.com/qdm12/gluetun-wiki/tree/main/setup/providers)
  53.       - VPN_SERVICE_PROVIDER=private internet access
  54.       - SERVER_REGIONS=Austria,Netherlands
  55.       # - SERVER_COUNTRIES=
  56.       # - SERVER_CITIES=
  57.       # - SERVER_HOSTNAMES=
  58.       # - SERVER_CATEGORIES=
  59.       - VPN_TYPE=openvpn
  60.       # OpenVPN:
  61.       #- OPENVPN_PROTOCOL=udp
  62.       - OPENVPN_USER=xxxxxxxxxxxxxx
  63.       - OPENVPN_PASSWORD=xxxxxxxxxxxxxxxxxxx
  64.       # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
  65.       - UPDATER_PERIOD=24h
  66.     devices:
  67.      # See https://github.com/qdm12/gluetun/issues/2538
  68.       - /dev/net/tun:/dev/net/tun
  69.     restart: always
  70.     # Host names must be manually mapped here for bitmagnet to resolve them:
  71.     extra_hosts:
  72.      - "postgres:10.0.13.11"
  73.     networks:
  74.       bitmagnet:
  75.         ipv4_address: 10.0.13.10
  76.   #
  77.   # Postgres - Bitmagnet DB
  78.   #
  79.   postgres:
  80.     image: postgres:16-alpine
  81.     container_name: bitmagnet-postgres
  82.     volumes:
  83.      - ./data/postgres:/var/lib/postgresql/data
  84.     networks:
  85.       bitmagnet:
  86.         ipv4_address: 10.0.13.11
  87.     ports:
  88.      - "5432:5432"
  89.     shm_size: 1g
  90.     restart: unless-stopped
  91.     mem_limit: 1g
  92.     cpu_shares: 1024
  93.     environment:
  94.      - POSTGRES_PASSWORD=postgres
  95.       - POSTGRES_DB=bitmagnet
  96.       - PGUSER=postgres
  97.     healthcheck:
  98.       test: ["CMD-SHELL", "pg_isready"]
  99.       interval: 10s
  100.       start_period: 20s
  101.  
  102. networks:
  103.   bitmagnet:
  104.     driver: bridge
  105.     ipam:
  106.       driver: default
  107.       config:
  108.         - subnet: 10.0.13.0/24
  109.           gateway: 10.0.13.1
Tags: Bitmagnet
Add Comment
Please, Sign In to add comment