Deploy Bold BI with Traefik Reverse Proxy using Multi Container Image
This section explains how to deploy the Bold BI application with Traefik reverse proxy using a multi-container Docker Compose file.
-
Create a Traefik configuration file with the name
traefik.yaml
for the Bold BI application.global: checkNewVersion: true # log default is ERROR log: level: WARN # enable dashboard on 8080 api: insecure: true dashboard: true ping: {} # auto-proxy containers if they have proper labels # and also use this file for dynamic config (tls) providers: docker: exposedByDefault: false watch: true file: fileName: /etc/traefik/traefik.yaml watch: true # listen on 80/443, and redirect all 80 to 443 via 301 entryPoints: web: address: :80 # comment out these lines if you don't want to redirect everything http: redirections: entryPoint: to: websecure scheme: https permanent: true websecure: address: :443 tls: certificates: - certFile: /certs/<ssl_cert_file_name> keyFile: /certs/<ssl_key_file_name>
<ssl_cert_file_name> - Name of the SSL certificate
Example: domain.crt
<ssl_key_file_name> - Name of the SSL Private key:
Example: domain.key -
Create a
default.conf
file that mounts the configuration details inside the Nginx container.#server { # listen 80; # server_name example.com; # return 301 https://example.com$request_uri; #} server { listen 80 default_server; #server_name example.com; #listen 443 ssl; #ssl on; #ssl_certificate /etc/ssl/domain.crt; #ssl_certificate_key /etc/ssl/domain.key; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_send_timeout 300; send_timeout 300; client_max_body_size 200M; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; large_client_header_buffers 4 16k; location / { root /application/idp/web/wwwroot; proxy_pass http://id-web/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; } location /api { proxy_pass http://id-api/api; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /ums { root /application/idp/ums/wwwroot; proxy_pass http://id-ums/ums; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /bi { root /application/bi/web/wwwroot; proxy_pass http://bi-web/bi; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /bi/api { proxy_pass http://bi-api/bi/api; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /bi/jobs { proxy_pass http://bi-jobs/bi/jobs; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /bi/designer { root /application/bi/designer/wwwroot; proxy_pass http://bi-dataservice; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /bi/designer/helper { proxy_pass http://bi-dataservice/bi/designer/helper; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }
-
Create a
docker-compose.yaml
file that starts your Bold BI application with Traefik reverse proxy.version: '3.5' services: id-web: container_name: id_web_container image: gcr.io/boldbi-294612/bold-identity:6.3.3 restart: on-failure environment: - APP_BASE_URL=https://example.com - INSTALL_OPTIONAL_LIBS=mongodb,mysql,influxdb,snowflake,oracle,npgsql volumes: - boldservices_data:/application/app_data networks: - boldservices healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 id-api: container_name: id_api_container image: gcr.io/boldbi-294612/bold-identity-api:6.3.3 restart: on-failure volumes: - boldservices_data:/application/app_data networks: - boldservices depends_on: - id-web healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 id-ums: container_name: id_ums_container image: gcr.io/boldbi-294612/bold-ums:6.3.3 restart: on-failure volumes: - boldservices_data:/application/app_data networks: - boldservices depends_on: - id-web healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 bi-web: container_name: bi_web_container image: gcr.io/boldbi-294612/boldbi-server:6.3.3 restart: on-failure volumes: - boldservices_data:/application/app_data networks: - boldservices depends_on: - id-web healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 bi-api: container_name: bi_api_container image: gcr.io/boldbi-294612/boldbi-server-api:6.3.3 restart: on-failure volumes: - boldservices_data:/application/app_data networks: - boldservices depends_on: - id-web - bi-web healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 bi-jobs: container_name: bi_jobs_container image: gcr.io/boldbi-294612/boldbi-server-jobs:6.3.3 restart: on-failure volumes: - boldservices_data:/application/app_data networks: - boldservices depends_on: - id-web - bi-web healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 bi-dataservice: container_name: bi_dataservice_container image: gcr.io/boldbi-294612/boldbi-designer:6.3.3 restart: on-failure # environment: ## Refer README.md for available environment variables. # - widget_bing_map_enable=false # - widget_bing_map_api_key="" # - AppSettings__locale-path="" volumes: - boldservices_data:/application/app_data networks: - boldservices depends_on: - id-web - bi-web healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health-check"] interval: 10s timeout: 10s retries: 5 reverse-proxy: container_name: nginx image: nginx restart: on-failure volumes: - "<default_conf_path>:/etc/nginx/conf.d/default.conf" # - "<ssl_cert_file_path>:/etc/ssl/domain.crt" # - "<ssl_key_file_path>:/etc/ssl/domain.key" environment: - NGINX_PORT= "443" labels: traefik.enable: 'true' traefik.http.routers.nginx.rule: Host(`example.com`) traefik.http.routers.nginx.entrypoints: websecure traefik.http.routers.nginx.tls: 'true' networks: - boldservices traefik: image: "traefik:v2.2" healthcheck: test: - CMD - traefik - healthcheck interval: 10s timeout: 5s retries: 3 ports: - "80:80" - "443:443" - "8080:8080" volumes: - <traefik yaml file path >:/etc/traefik/traefik.yaml - <SSL certificate folder path>:/certs/ - /var/run/docker.sock:/var/run/docker.sock networks: - boldservices networks: boldservices: volumes: boldservices_data: driver: local driver_opts: type: 'none' o: 'bind' device: '<host_path_boldbi_data>'
Replace the example.com with a domain name in APP_URL and labels section.
< traefik yaml file path > - Specify the path for the traefik yaml configuration file
Example: /root/traefik.yaml
< SSL certificate folder path > - Specify the path for the SSL certificate folder
Example: /root/certs/
Note: Refer to this document to learn about the environment variable for the Bold BI application. -
Provide the default.conf file path, which you have copied earlier in the <default_conf_path> place from STEP 2.
For example,
"./default.conf:/etc/nginx/conf.d/default.conf"
"D:/boldbi/docker/default.conf":"/etc/nginx/conf.d/default.conf"
"/var/boldbi/docker/default.conf:/etc/nginx/conf.d/default.conf"
-
Allocate a directory in your host machine to store the shared folders for applications’ usage. Replace the directory path with the <host_path_boldbi_data> in the docker-compose.yml file.
For example,
Linux: device: ‘/var/boldbi/boldbi_data’
Windows: device: ‘D:/boldbi/boldbi_data’ -
Now, build a container using the following command from the Bold BI docker-compose file location.
docker-compose up -d
-
Configure the Bold BI On-Premise application startup to use the application. Please refer to the following link for more details on configuring the application startup.