Documentation
Getting Started
Docker

Docker Setup

Prerequisites

Install services with Docker

  1. Download the docker-compose example file

    docker-compose.yml
    version: "3.7"
    services:
      dragonite:
        image: ghcr.io/unownhash/dragonite-public:latest
        container_name: dragonite
        restart: unless-stopped
        volumes:
          - type: bind
            source: ./dragonite_config.toml
            target: /dragonite/config.toml
          # Optional volume if you want to have access to logs
          # - type: bind
          #   source: ${PWD}/logs
          #  target: /dragonite/logs
        ports:
          - "7272:7272" # change left one for external port
        # If you want to use a non docker database enable following lines and
        # change the Database URL to 'host.docker.internal'
        #extra_hosts:
        #  - "host.docker.internal:host-gateway"
      admin:
        image: ghcr.io/unownhash/dragonite-public-admin:latest
        container_name: admin
        restart: unless-stopped
        environment:
          ADMIN.GENERAL.HOST=0.0.0.0
          ADMIN.GENERAL.PORT=7273
          ADMIN.GENERAL.USERNAME=admin
          ADMIN.GENERAL.PASSWORD=password
          ADMIN.GENERAL.LOG_LEVEL=info
          ADMIN.GENERAL.API_SECRET=''
     
          ADMIN.BACKENDS.0.DRAGONITE_ENDPOINT=http://dragonite:7272
          ADMIN.BACKENDS.0.GOLBAT_ENDPOINT=http://golbat:9001
          ADMIN.BACKENDS.0.GOLBAT_API_SECRET=''
     
          #ADMIN.BACKENDS.1.DRAGONITE_ENDPOINT=http://dragonite:7274
          #ADMIN.BACKENDS.1.GOLBAT_ENDPOINT=http://golbat:9002
          #ADMIN.BACKENDS.1.GOLBAT_API_SECRET=""
        ports:
          - "7273:7273" # change left one for external port
      golbat:
        image: ghcr.io/unownhash/golbat:main
        container_name: golbat
        restart: unless-stopped
        volumes:
          - type: bind
            source: ${PWD}/golbat_config.toml
            target: /golbat/config.toml
        # Optional volumes if you want to have access to logs and persist cache
        #  - type: bind
        #    source: ${PWD}/cache
        #    target: /golbat/cache
        #  - type: bind
        #    source: ${PWD}/logs
        #    target: /golbat/logs
        ports:
          - "9001:9001" # change left one for external port
          - "50001:50001" # change left one for external port
        # If you want to use a non docker database enable following lines and
        # change the Database URL to 'host.docker.internal'
        #extra_hosts:
        #  - "host.docker.internal:host-gateway"
      rotom:
          image: ghcr.io/unownhash/rotom:main
          container_name: rotom
          restart: unless-stopped
          volumes:
            - type: bind
              source: ${PWD}/rotom_config.json
              target: /rotom/config/local.json
          # Optional volumes if you want to have access to logs and persist cache
          #  - type: bind
          #    source: ${PWD}/logs
          #    target: /rotom/logs
          ports:
            - "7070:7070" # change left one for external port
            - "7071:7071" # change left one for external port
            - "7072:7072" # change left one for external port
     
    networks:
      default:
        name: scanner

    If you want your database managed by docker feel free to add it to the same docker-compose.yml file. Alteratively, as long as both the database service and Unown# services are in the same docker network you will be able to seamlessly connect services across multiple docker-compose.yml files.

    ℹ️

    If you want logs and cache files outside of docker go ahead and create your directories now.

    mkdir logs cache
  2. Download Dragonite config file

    wget -O dragonite_config.toml https://raw.githubusercontent.com/UnownHash/Dragonite-Public/main/dragonite/config.toml.example
  3. Download Golbat config file

    wget -O golbat_config.toml https://raw.githubusercontent.com/UnownHash/Golbat/main/config.toml.example
  4. Download Rotom config file

    wget -O rotom_config.json https://raw.githubusercontent.com/UnownHash/Rotom/main/config/local.json.example
  5. Modify your three config files and docker-compose.yml files

    Make sure to update the highlighted lines from our snippets into your config files.

    Note: this doesn't cover 100% of the configuration just the basics to get you started. We highly recommend setting a raw_bearer secret if these services are accessible from the public internet.

    Using Golbat's gRPC endpoint (default port 50001) is recommended over the raw endpoint (default 9001).

    dragonite_config.toml
    [rotom]
    endpoint = "ws://rotom:7071"
     
    [processors]
    golbat_endpoint = "http://golbat:9001"
    golbat_raw_bearer = ""
    golbat_api_secret = "golbat1234"
    # if this is present then dragonite will not send raws to the httpendpoint. You still need the regular endpoint for API calls.
    golbat_grpc_endpoint = "golbat:50001"
     
    [db]
    host = "db" 
    port = 3306
    user = ""
    password = ""
    name = "dragonite"
    golbat_config.toml
    port = 9001             # Listening port for golbat
    grpc_port = 50001       # Listening port for grpc
    raw_bearer = ""         # Raw bearer (password) required
    api_secret = "golbat1234"   # Golbat secret required on api calls (blank for none)
     
    [database]
    user = ""
    password = ""
    address = "db:3306"
    db = "golbat"

    It is highly recommended setting a secret if Rotom is accessible from the public internet.

    Please also note Rotom does not have any authentication for it's web client. It is recommended that you run this service on your internal network, behind a Firewall, or protected by a cloud based application layer.

    rotom_config.json
    "deviceListener": {
      "port": 7070,
      "secret": ""
    },
    "controllerListener":{
      "port": 7071,
      "secret": ""
    },
    "client": {
      "port": 7072,
      "host": "0.0.0.0"
    },
    docker-compose.yml
    ...
    admin:
        image: ghcr.io/unownhash/dragonite-public-admin:latest
        container_name: admin
        restart: unless-stopped
        environment:
          ADMIN_GENERAL_HOST: 0.0.0.0
          ADMIN_GENERAL_USERNAME: admin
          ADMIN_GENERAL_PASSWORD: password
          ADMIN_DRAGONITE_API_ENDPOINT: http://dragonite:7272
          ADMIN_DRAGONITE_API_SECRET: secret
          ADMIN_GOLBAT_API_ENDPOINT: http://golbat:9001
          ADMIN_GOLBAT_API_SECRET: golbat1234
        ...
  6. Start the services

    ℹ️

    If this is the first time using GitHub container registry you will need to login. When prompted use your personal access token not password. More info (opens in a new tab)

    docker login ghcr.io -u GITHUB_USERNAME
    docker-compose pull
    docker-compose up -d

Updating

Updating with docker is straight forward

docker-compose pull
docker-compose up -d