Skedler Reports v4 Docker Compose Installation Guide

Modified on Sat, 25 Sep, 2021 at 5:25 PM

Introduction

Skedler Reports is now available in the Docker Compose. It is a tool for defining and running multi-container (Skedler Reports) Docker applications. With Compose, you use a YAML file to configure your application's services. Then with a single command, you create and start all the services from your configuration. 

  • Install Docker Compose (Note: docker-compose is not pre-installed with Docker on Linux) 

  • Install docker-compose following the installation instructions that can be found here 

Step-by-Step Instruction

Step 1: Define service in a Compose file:

  • Create a file called docker-compose.yml in your project directory and paste the following 

    • docker-compose.yml:  

      version: '2.4'
      services:
        reports:
          image: skedler/reports:latest
          container_name: reports
          privileged: true
          cap_add:
            - SYS_ADMIN
          volumes:
            - /sys/fs/cgroup:/sys/fs/cgroup:ro
            - reportdata:/var/lib/skedler
            - ./reporting.yml:/opt/skedler/config/reporting.yml
          command: /opt/skedler/bin/skedler
          ports:
            - 3000:3000
          networks:
            - skedlernet
      
      volumes:
        reportdata:
          driver: local
      networks:
        skedlernet:   
          

  • This Compose file defines the service of Skedler Reports. 


Step 2: Basic Skedler configurations using reporting.yml

Skedler Reports needs a datastore to store Skedler Reports metadata and history data. By default, Skedler Reports uses Internal Database as a Datastore. Alternatively, you can configure either Elasticsearch or an external “MySQL” or “SQLite” database as a Datastore in reporting.yml.

  • a) Create a file called reporting.yml in your project directory. 

    • Get the reporting.yml file from here 

  • Note: For more configuration options kindly refer the article reporting.yml and ReportEngineOptions Configuration 

    b) The following folders are persisted in the mapped volume (ie reportdata)


    • Log files -  log_dir: Persist log information in /var/lib/skedler/logs folder.
    • Custom images, images and custom CSS - ui_files_location: Persist UI information in /var/lib/skedler/uifiles folder.
    • Database - Persist Skedler infomations in /var/lib/skedler/skedler.db and /var/lib/skedler/skedlerHistory.db
    • *Reports -  reports_dir: Persist generated report information in /var/lib/skedler/reports folder.
  • Note: *Report generation path needs to be configured for "Base Folder Directory" as "/var/lib/skedler/reports" in the Skedler configuration page to persist the generated reports.


Step 3: Build and run your app with compose

  • From your project directory, start up your application by running 

    sudo docker-compose up

    Compose pulls a Skedler Reports image, builds an image for your code, and starts the services you defined

    Enter http://<hostIP>:3000 in a browser to see the Skedler Reports application running 

    If you want to run your services in the background, you can pass the -d flag (for "detached" mode) to docker-compose up and docker-compose ps to see what is currently running

    sudo docker-compose up -d

    To stop the service use the following command:

    sudo docker-compose down

    You can bring everything down, removing the containers entirely, with the down command. Pass --volumes to also remove the data volume just type:

    sudo docker-compose down -v

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article