servicecatalog / oscm-dockerbuild

OSCM docker build files.
Apache License 2.0
3 stars 10 forks source link

Issue with oscm-birt #340

Closed GoebelL closed 3 years ago

GoebelL commented 3 years ago

Version Info v19.1, 20210405

Describe the bug In case of oscm-initdb execution, the .env contained HOST_FQDN is resolved correctly and written in the database configuration settings. However this setting cannot be resolved at runtime. In standard start procedure with docker-compose -f docker-compose-oscm.yml up -d the .env file is not evaluated again and therefore the following environment settings are getting wrong

OSCM_CORE_URL
OSCM_APP_URL
OSCM_IDENTITY_URL
OSCM_BIRT_URL
MP_ERROR_REDIRECT_HTTPS

There is at least one impact with the reporting engine. When creating the container the start.sh script should replace the internal localhost URL for the BIRT base_url setting with the external URL. This requires that OSCM_BIRT_URL is resolved from var.env with correct host name.

How to Reproduce

  1. Install with OSCM as described on GitHub
  2. Stop OSCM and remove all containers
  3. Start OSCM
  4. Run docker exec -it oscm-birt bash
  5. Check base_url: cat /usr/share/tomcat/webapps/birt/WEB-INF/viewer.properties |more
  6. Enter 'env' to list the environment settings

Expected behavior Step 5: The complete URL is written in viewer.properties Step 6: The env settings are correct

Observed behavior Step 5: The server and port part is missing in the base URL in viewer.properties Step 6: The server and port part is missing in all variables as listed above

Additional context Fix 1 (minimum): Avoid any unresolved variables in var.env. Change the oscm-deployer start script to write the already given HOST_FQDN in all respective URLs variables. Fix 2: Seek a way to make the oscm docker-compose template to resolve nested variables correctly by reading also from .env.

GoebelL commented 3 years ago

@cworf91 The proxy.conf still contains wrong ${FQDN} placeholders. The string rename in this former commit didn't hit all occurrences.

GoebelL commented 3 years ago

All reports are doing well after this fix.