Super-Visions / docker-itop

https://hub.docker.com/r/supervisions/itop/
20 stars 19 forks source link

Resources (CSS, webfonts, etc) not being loaded (AWS-hosted) #18

Closed matt-jay closed 8 months ago

matt-jay commented 9 months ago

I have set up iTop using docker compose on an AWS EC2 instance. I can successfully connect to the interface (UI.php and page-script.js load fine), but all styling appears to be missing:

image

Some resource files (fonts, JS, CSS) appear to be failing to load after 20+ seconds:

image

What I can observe for all of these resources is that while I run the site at :8010, these resources are requested from <some (Amazon?) IP>:8010/path/to/resource

image

Has anyone experienced something similar, possibly in this specific context (AWS hosted), and can advise on steps to resolve the issue? Is this something that should be possible to fix in the iTop config (in terms of what host the resources are being requested from), or does this appear to be an issue with AWS magic?

Hipska commented 8 months ago

What is configured as app_root_url in the config file? And also see this documentation.

matt-jay commented 8 months ago

@Hipska : What config file are you referring to? I can't find the app_root_url string in the documentation. At first glance, I found a reference to a config file in conf/production, but that one does not appear to have that setting:

root@13be8ba8a26e:/var/www/html/conf/production# cat config-itop.php
<?php

$MySettings = array(
    'db_host'    => $_ENV['DB_HOSTNAME'],
    'db_name'    => $_ENV['DB_ENV_MYSQL_DATABASE'],
    'db_user'    => $_ENV['DB_ENV_MYSQL_USER'],
    'db_pwd'     => $_ENV['DB_ENV_MYSQL_PASSWORD'],
    'db_subname' => $_ENV['DB_PREFIX'],
);

$MyModuleSettings = array();
$MyModules = array('addons' => array());
Hipska commented 8 months ago

It looks like you didn't run setup first. This needs to be done for every iTop instance before it can be used.

matt-jay commented 8 months ago

Sure looks like it! Apologies ... running setup fixed things.