Skip to content

Running Manga Tagger with Docker

jmeacoe edited this page Nov 6, 2022 · 3 revisions

Docker-Compose.yml

version: "2.1"
services:
  mangatagger:
    image: banhcanh/manga-tagger
    container_name: mangatagger
    environment:
      - PUID=1000
      - PGID=1000
      # timezone
      - TZ=Europe/Paris
      - UMASK=022 #optional
      
    # USER SETTINGS
      - MANGA_TAGGER_IMAGE_COVER=false
      - MANGA_TAGGER_ADULT_RESULT=false

    #  Database Settings
      - MANGA_TAGGER_DB_NAME=manga_tagger
      - MANGA_TAGGER_DB_HOST_ADDRESS=mangatagger-db
      - MANGA_TAGGER_DB_PORT=27017
      - MANGA_TAGGER_DB_USERNAME=manga_tagger
      - MANGA_TAGGER_DB_PASSWORD=Manga4LYFE
      - MANGA_TAGGER_DB_AUTH_SOURCE=admin
      - MANGA_TAGGER_DB_SELECTION_TIMEOUT=10000

    volumes:
      - /path/to/config:/config
      - /path/to/library:/manga
      - /path/to/downloads:/downloads
    restart: unless-stopped
    depends_on:
      - mangatagger-db

#    ports:  # Optional, only useful for TCP and Json TCP logging
#      - 1798:1798
#      - 1799:1799

  mangatagger-db: # you can use your own mongodb, edit the manga-tagger settings.json accordingly
    image: mongo
    container_name: mangatagger-db
    volumes:
      - /path/to/mangatagger/db:/data/db # db persistence
    environment:
      MONGO_INITDB_ROOT_USERNAME: manga_tagger
      MONGO_INITDB_ROOT_PASSWORD: Manga4LYFE
      MONGO_INITDB_DATABASE: manga_tagger
    restart: unless-stopped

Volume Mounts

There's 4 volume paths that you must change

This setting has the following structure <Path/In/Host> : <Path/In/Container>

<Path/In/Host> means the path in the system where docker is installed

<Path/In/Container> Is a virtual path that will be created in the container. This should not be modified or Manga-Tagger won't work

Note: Mind the : that separates both values.

These are what each volume is for. Change your values in your docker-compose.yml file accordingly

  • /path/to/config - Where the config of MangaTagger is stored
  • /path/to/library - The library where the files will be moved to
  • /path/to/downloads - The folder where the downloads arrive to. Manga-Tagger watches new files created and moved and process them
  • /path/to/mangatagger/db - The folder where the database will be stored

Configurable container environment variables

User Settings

MANGA_TAGGER_IMAGE_COVER

Should MangaTagger append the series cover to every chapter or the first chapter.

  • Values: true|false|first

MANGA_TAGGER_ADULT_RESULT

Enable adult result. This setting may give wrong manga match.

Make sure the input manga title is as accurate as possible if enabling this or it may confuse Anilist's search.

  • Values: true|false

Debug Settings

MANGA_TAGGER_DRY_RUN

Set to true to prevent Manga Tagger from certain processing

  • Values: true|false
  • Default: false

MANGA_TAGGER_DB_INSERT

Disable Manga Tagger from inserting records into the database while set to false

  • Values: true|false
  • Default: false

MANGA_TAGGER_RENAME_FILE

Disable Manga Tagger from renaming files when set to false

  • Values: true|false
  • Default: false

MANGA_TAGGER_WRITE_COMICINFO

Disable Manga Tagger from writing the comicinfo.xml to files while set to false

  • Values: true|false
  • Default: false

MANGA_TAGGER_THREADS

Define an amount of worker threads for Manga Tagger to spawn

  • Default: 8

MANGA_TAGGER_MAX_QUEUE_SIZE

Define the maximum size the file queue should be for worker threads

  • Default: 0

Database Settings

Manga-Tagger lets you use your own mongo-db settings. Leave the default values if you are not using an external db

MANGA_TAGGER_DB_NAME

Define the name of your database

  • Default: manga_tagger (recommended)

MANGA_TAGGER_DB_HOST_ADDRESS

Define the hostname/IP address of your database

  • Default: mangatagger-db

MANGA_TAGGER_DB_PORT

Define the port of your database

  • Default: 27017

MANGA_TAGGER_DB_USERNAME

Define the username used to connect to your database

  • Default: manga_tagger

MANGA_TAGGER_DB_PASSWORD

Define the password used to connect to your database

  • Default: Manga4LYFE

MANGA_TAGGER_DB_AUTH_SOURCE

Define the authentication table used for your defined username

  • Default: admin

MANGA_TAGGER_DB_SELECTION_TIMEOUT

Define the server selection timeout (in milliseconds) which depends on your network connection and server configuration

  • Default: 10000

Logging Settings

MANGA_TAGGER_LOGGING_LEVEL

The type of messages that should be logged

  • Values: info|debug
  • Default: info

MANGA_TAGGER_LOGGING_CONSOLE

Set to true to enable console logging

  • Values: true|false
  • Default: true

MANGA_TAGGER_LOGGING_FILE

Set to true to enable file-based loggin

  • Values: true|false
  • Default: true

MANGA_TAGGER_LOGGING_JSON

Set to true to enable JSON logging to file (used for DataDog integration)

  • Values: true|false
  • Default: false

MANGA_TAGGER_LOGGING_TCP

Set to true to enable TCP logging

  • Values: true|false
  • Default: false

MANGA_TAGGER_LOGGING_JSONTCP

Set to true to enable JSON TCP logging

  • Values: true|false
  • Default: false