Deploy Bold Reports® on Docker Multiple Container

Bold Reports® can be deployed using Docker containers to simplify setup, enhance scalability, and streamline maintenance. A multi-container Docker setup enables you to run Bold Reports® in isolated containers that work together.

How do I prepare the Bold Reports® multi-container project?

You prepare the Bold Reports® multi-container project by creating a project directory, downloading the compose and Nginx files, and editing them. Follow these steps:

  1. Create an empty project directory.

    You can name the directory something easy for you to remember. This directory is the context for your application image. The project directory should contain a docker-compose.yml file, which is complete in itself for a good starter Bold Reports® project.

  2. Make and change into your project directory. For example, if you named your directory my_boldreports:

     cd my_boldreports/
  3. Download the docker-compose YML file and configuration file for Nginx files by running the following commands:

    curl -o docker-compose.yml "https://raw.githubusercontent.com/boldreports/bold-reports-docker/refs/heads/master/deploy/multiple-container/docker-compose.yml"
    curl -o default.conf "https://raw.githubusercontent.com/boldreports/bold-reports-docker/refs/heads/master/deploy/multiple-container/default.conf"  
  4. Replace <app_base_url> with the DNS or IP address you want to use to access the application. For example,
    http://example.com
    https://example.com
    http://<public_ip_address>
    http://host.docker.internal

    Note:
    * If you use the IP address for the Base URL, use the public IP of the machine instead of the internal IP or local IP address. Applications can communicate with each other using the public IP alone. Host machine IP will not be accessible inside the application container.
    * Use http://host.docker.internal instead of http://localhost. Host machine localhost DNS will not be accessible inside the container. So, docker desktop provides host.docker.internal and gateway.docker.internal DNS for communication between docker applications and host machine. Make sure that the host.docker.internal DNS has your IPv4 address mapped in your hosts file on Windows(C:\Windows\System32\drivers\etc\hosts) or Linux (/etc/hosts).
    * Provide the HTTP or HTTPS scheme for APP_BASE_URL value.

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

  6. Provide the default.conf file path, which you downloaded earlier, in the <default_conf_path> place.

    For example:
    Windows: "D:/boldreports/docker/default.conf":"/etc/nginx/conf.d/default.conf"
    Linux: "/var/boldreports/docker/default.conf:/etc/nginx/conf.d/default.conf"

    The following screenshot shows the default.conf path in the docker-compose.yml file.

    docker-compose.yml

  7. Allocate a directory in your host machine to store the shared folders for applications’ usage. Replace the directory path with <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. Learn more about docker volumes

Build the project

Bold Reports® starts when you run docker-compose up -d from your project directory.

The docker-compose up command runs in detached mode, pulls the needed Docker images, and starts the boldreports and database containers.

Note: To use the PostgreSQL server deployed with Bold Reports® using the docker-compose.yaml file, use pgdb as the host name of the PostgreSQL server.

Bring up Bold Reports® in a web browser

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

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

Application Startup

Configure the Bold Reports® On-Premises Edition application startup to use the application. Refer to the following application startup guide for more details.

https://help.boldreports.com/enterprise-reporting/application-startup/

Shutdown and cleanup

Bold Reports® multi-container deployments are stopped and removed with Docker Compose commands.

The command docker-compose down removes the containers and default network, but preserves the volumes of Bold Reports® and PostgreSQL.

The command docker-compose down —volumes removes the containers, default network, and all the volumes.

Frequently asked questions

Why can’t I use localhost as the Bold Reports® base URL in Docker?

Host machine localhost DNS is not accessible inside the Bold Reports® container. Use http://host.docker.internal or the public IP of the machine instead.

Why is Bold Reports® not available right after docker-compose up?

The Bold Reports® containers are still being initialized and may take a couple of minutes before the first load.

See also