Docker

This documentation describes how to deploy our Docker application containers in environment without an access to the Internet.

Docker installation

For the Docker, make sure you have Docker Engine installed: docs.docker.com/engine/install
You also don't need an Internet connection for this, just follow the instructions for your distro and use this method of installation: Install from the package.
If your distro is not supported, please refer to installation using binaries

As for the Docker compose vs Docker run methods, they both produce the same result, this manual assumes the usage of Docker compose method.

Installation of the downloaded Docker image

Transfer the downloaded xormon-ng-docker-<version>.tar.gz archive onto the server.
Then do the same for the latest TimescaleDB Docker image.
We recommend using the latest-pg16 version of the image.
After you do this, follow the instructions of the Docker method of your preference

Docker compose scenario would follow like this (it only differs in step 4 and 5):
  1. Make sure you have the archive xormon-ng-docker-<version>.tar.gz prepared on the machine.

  2. Follow step by step from here but do not run the containers yet: Docker compose

  3. Then run this command to load the image locally:
    docker load <  xormon-ng-docker-<version>.tar.gz
    
  4. After that, inside the docker-compose.yml, edit this part:
    image: xorux/xormon-ng:latest
    to this:
    image: xormon:<version>
    
    Note: It is important that you keep the formatting of the .yml file the same as original, otherwise it won't work.

  5. Finally, use this command to start the app:
    docker compose up -d
    
  • Prerequisites

    • Linux VM with the latest version of Docker Engine
    • access to Docker Hub
    • available ports: 5432 and 8443
    • Docker compose CLI plugin

  • Create .env file
    cd ~/xormon-ng
    vi .env
    File contents
    APP_PORT=8443
    TZ=<timezone>
    DB_HOST=timescaledb
    DB_PORT=5432
    DB_USERNAME=postgres
    DB_PASSWORD=<db_password>
    DB_DATABASE=xormon
    APP_DEBUG=false
    APP_SECRET=<xormon-secret>
    Replace <variables> with values:
    • <timezone> : Linux timezone, e.g. 'Europe/Prague' (see TZ in /usr/share/zoneinfo)
    • <db_password> : password used for running Timescale DB container
    • <xormon-secret> : any unique string, e.g. 'my-xormon-secret'

  • Create docker-compose YAML file
    cd ~/xormon-ng
    vi docker-compose.yml
    file contents (copy/paste)
    services:
      timescaledb:
        image: timescale/timescaledb:latest-pg16
        init: true	
        restart: unless-stopped
        ulimits:
          core: 0
        environment:
          - POSTGRES_USER=${DB_USERNAME}
          - POSTGRES_PASSWORD=${DB_PASSWORD}
          - TZ=${TZ}
        volumes:
          - ./data:/var/lib/postgresql/data
        ## uncomment if you want to have Postgres (TSDB) port opened on host
        # ports:
        #  - '5432:5432'
    
      xormon:
        image: xorux/xormon-ng:latest
        init: true	
        restart: unless-stopped
        ulimits:
          core: 0
        depends_on:
          - timescaledb
        env_file: .env
        volumes:
          - ./files:/usr/src/app/server-nest/files
        ports:
          - ${APP_PORT}:${APP_PORT}
          - 8162:8162
  • Run containers
    docker compose up -d
  • Navigate to XorMon NG GUI
    https://<docker_vm_IP>:8443/
    Default login: xormon / xormon

  • XorMon NG upgrade

    Do not use 'Application Upgrade' form in GUI!
    docker compose pull
    docker compose up -d
  • Prerequisites

    • Linux VM with the latest version of Docker Engine
    • access to Docker Hub
    • available ports: 5432 and 8443

  • Create a directories for permanent data storage
    mkdir -p /var/xormon-ng/data
    mkdir -p /var/xormon-ng/files
  • Timescale DB

    • Prepare a password for the databse and note it down

    • Run the database container
      docker run --init -v /var/xormon-ng/data:/var/lib/postgresql/data \
      -d --name timescaledb -p 5432:5432 \
      -e POSTGRES_PASSWORD=<db_password> -e TZ=<timezone> timescale/timescaledb:latest-pg16
    • Note: Upgrading from older PostgreSQL versions within the TimescaleDB container
      If you already have data in the /var/xormon-ng/data volume from older PostgreSQL versions and want to upgrade the TimescaleDB container to PostgreSQL 16, please refer to the manual provided in the official TimescaleDB documentation.

      If the /var/xormon-ng/data directory is empty, you can proceed with the standard installation process

  • XorMon NG

    • Prepare a configuration file
      cd /var/xormon-ng
      vi ./xormon-ng.env
      file contents (copy/paste)
      APP_PORT=8443
      TZ=<timezone>
      DB_HOST=timescaledb
      DB_PORT=5432
      DB_USERNAME=postgres
      DB_PASSWORD=<db_password>
      DB_DATABASE=xormon
      APP_SECRET=<xormon-secret>
      Replace <variables> with values:
      • <timezone> : Linux timezone, e.g. 'Europe/Prague' (see TZ in /usr/share/zoneinfo)
      • <db_password> : password used for running Timescale DB container
      • <xormon-secret> : any unique string, e.g. 'my-xormon-secret'

    • Run XorMon NG container
      docker run --init -d --name xormon --ulimit core=0 -p 8443:8443 \
      -v /var/xormon-ng/files:/usr/src/app/server-nest/files \
      --link timescaledb:timescaledb --env-file ./xormon-ng.env xorux/xormon-ng:latest
  • Navigate to XorMon NG GUI
    https://<docker_vm_IP>:8443/
    Default login: xormon / xormon

  • XorMon NG upgrade

    Do not use 'Application Upgrade' form in GUI!

    Stop, remove and re-run XorMon NG container
    docker rm -f {UUID|name}
    docker run --init -d --name xormon --ulimit core=0 -p 8443:8443 \
    -v /var/xormon-ng/files:/usr/src/app/server-nest/files \
    --link timescaledb:timescaledb --env-file ./xormon-ng.env xorux/xormon-ng:latest