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 1: Define service in a Compose file:
Create a file called docker-compose.yml in your project directory and paste the following
version: '2.2' 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
a) Create a file called reporting.yml in your project directory.
Get the reporting.yml file from here
b) Configure Skedler Reports Configuration like port, kibana_index, Elasticsearch URL, Kibana URL, Grafana URl and skedler_index in reporting.yml
- port - The port in which skedler runs. Default port is 3000
- elasticsearch_url -Elasticsearch URL with the port (even if the port is 80) in the following format <protocol>://<server>:<port>
- kibana_url - Kibana URL with the port in the following format <protocol>://<server>:<port
- grafana_url - Grafana URL with the port in the following format <protocol>://<server>:<port>
Note: For more configuration options kindly refer the article reporting.yml and ReportEngineOptions Configuration
c) 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