Articles in this section
Category / Section

How to Deploy Bold Reports Application on Docker Swarm

Published:
Updated:

Bold Reports supports both single-container and multi-container(docker-compose) deployment in Docker. Docker deployment allows you to build, test, and deploy applications quickly.

Docker compose:

  • BoldReports in Single container image.
  • BoldReports in Multi container image.

Single container Bold Reports with docker-compose

  1. Create a docker-compose.yml file that starts your Bold Reports instance with volume mounts for data persistence, or download this configuration file.

    version: '3.5'
    
    services:
      boldreports:
       image: syncfusion/boldreports
       restart: always
       ports:
         - 80:80
       environment:
         # Required
         - APP_URL=<app_base_url>                     # Set the Application base URL or the machine IP of external DNS to access the site. For example: https://example.com or http://172.174.25.9 or http://host.docker.internal
         # Optional: Uncomment the line below, if you want to use the client libraries.
         #  - OPTIONAL_LIBS=mysql,oracle,postgresql
       networks:
         - boldreports
       volumes:
         - boldreports_data:/application/app_data
    
      pgdb:
        image: postgres
        restart: always
        environment:
          POSTGRES_PASSWORD: <Password>                 # Set the password for the PostgreSQL database that will be deployed along with this Bold Reports deployment.
        volumes:
          - db_data:/var/lib/postgresql/data/
        networks:
          - boldreports
    
    networks:
      boldreports:
    
    volumes:
      boldreports_data:
        driver: local
        driver_opts:
          type: 'none'
          o: 'bind'
          device: '<host_path_boldreports_data>'        # Set the path for storing the data of the bold reports.
      db_data:
        driver: local
        driver_opts:
          type: 'none'
          o: 'bind'
          device: '<host_path_db_data>'                 # Set the path for the docker PostgreSQL database data to be stored.
    
  2. Replace the <app_base_url> with your DNS or IP address, by which you want to access the application.

    For example:
    http://example.com
    https://example.com
    http://<public_ip_address>

    Note

    1. If you are using the IP address for the Base URL, ensure that you use the public IP address of the machine rather than the internal or local IP address. Applications can communicate with each other using only the public IP. The host machine’s IP will not be accessible within the application container.
    2. Provide the HTTP or HTTPS scheme for APP_BASE_URL value.
  3. You can also change the port number to something other than 80.

  4. Allocate a directory on your host machine to store shared folders for applications usage. Replace the directory path with <host_path_boldreports_data> in docker-compose.yml file. For example: Windows: device: ‘D:/boldreports/boldreports_data’ and device: ‘D:/boldreports/db_data’ Linux: device: ‘/var/boldreports/boldreports_data’ and device: ‘/var/boldreports/db_data’

    Note: The docker volumes boldreports_data and db_data persist data of Bold Reports and PostgreSQL , respectively. Click here to learn more.

  5. Run the following command from the project directory.

    docker stack deploy --compose-file docker-compose.yml boldreports
    

    Bold Reports should be running in the <app_base_url> (as appropriate).

    Note: The BoldReports site is not immediately available on port 80 because the containers are still being initialized and may take a couple of minutes for the first load.

  6. Configure the Bold Reports On-Premises application startup to use the application.

Multi container Bold Reports with docker-compose

  1. Download the configuration files here. This directory includes docker-compose YML file and configuration file for Nginx.

    NOTE: You can use either a .yml or .yaml extension for this file. They both work well.

  2. Replace the <app_base_url> with your DNS or IP address, by which you want to access the application.
    For example:
    http://example.com
    https://example.com
    http://<public_ip_address>

  3. You can also change the Port number other than 80.

  4. Provide the default.conf file, which you downloaded earlier, in the <default_conf_path> location.

         For example,
         "./default.conf:/etc/nginx/conf.d/default.conf"
         "D:/boldreports/docker/default.conf":"/etc/nginx/conf.d/default.conf"
         "/var/boldreports/docker/default.conf:/etc/nginx/conf.d/default.conf"
    
    reverse-proxy:
    container_name: nginx
    image: nginx
    restart: on-failure
    volumes:
      -   "<default_conf_path>:/etc/nginx/conf.d/default.conf"    # Set the default.conf file path.
      # - "<ssl_cert_file_path>:/etc/ssl/domain.crt"
      # - "<ssl_key_file_path>:/etc/ssl/domain.key"
    ports:
      - "80:80"
      # - "443:443"
    environment:
      - NGINX_PORT=80
    networks:
      - boldservices
    depends_on:
      - id-web
      - id-api
      - id-ums
      - reports-web
      - reports-api
      - reports-jobs
      - reports-reportservice
      - reports-viewer
    
  5. Allocate a directory on your host machine to store shared folders for application usage. Replace the directory path with the <host_path_boldservices_data> and <host_path_db_data> in docker-compose.yml file.

    For example,
    Windows: device:‘D:/boldreports/boldservices_data’ and device: ‘D:/boldreports/db_data’
    Linux: device: ‘/var/boldreports/boldservices_data’ and device: ‘/var/boldreports/db_data’

    Note: The Docker volumes boldservices_data and db_data persist data of Bold Reports and PostgreSQL, respectively. Click here to learn more.

  6. Run the following command from the project directory

    docker stack deploy --compose-file docker-compose.yml boldreports
    
  7. BoldReports should be running at the <app_base_url> (as appropriate).

  8. Configure the Bold Reports On-Premises application startup to use the application.

Related links

  1. How to deploy Bold Reports application on a Linux server
  2. How to deploy Bold Reports application on Azure App service
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied