Docker Image and JSReport
-
TLDR; I am unable to get jsreport docker image to resolve the assets even after updating the hosts file in the container.
My setup is the following (all docker images):
- JSReport Server
- Apache Server
- PHP-FPM with Source Code
Requests come in the following way
Apache Server -> PHP-FPM through a proxy setup in site configuration file.My end goal is this
Apache Server -> PHP-FPM -> JSReport Server -> Apache Server (when needing to resolve assets)I update the host file in the container to contain the proper url and the ip. I have the url set in "extensions_base_url" and "extentions_asset_rootUrlForLinks" (might be overkill). My reports load fine through html but pdf does not.
Logs return:debug: Failed to load resource: net::ERR_CONNECTION_REFUSED
If I access the container, install curl and put in the asset urls, the CSS returns fine. How can I debug this further?
I am interesting in doing extremely minimal deployment so I am avoiding loading the assets as volumes at this time.
-
Try to create a test template with just
text
recipe.Put there an asset reference you want. Like this
{#asset jquery.js @encoding=link}
To what url does it resolve? Are you able to reach it from within the container?
-
I figured it out. I was using site.localhost which meant everything pointed to 127.0.0.1