Skip to content

Frontend config.js inside the container #1051

@ZakarFin

Description

@ZakarFin

I'm trying to setup the docker container that has been uploaded to GitHub packages as is, but it seems only works if run on localhost. The ui.zip in both 2024.0.0 and 2024.0.1 has this config.js file included validator\js\config.js that points to http://localhost:8090. I can't find any configuration option to override this and it basically means that when the user clicks the "Start test" button on Test selection page OR accesses the Test reports page the browser tries to call the localhost instead of the service that the page is shown from. Also I can't find the repository that hosts this ui.zip (it's only included in the release version package as binary zip-file?)

validator/js/config.js has this:

var serverURL = "http://localhost:8090/validator/v2/";
var serverRealURL = "http://localhost:8090/validator/v2/";
var serverDirectURL = "http://localhost:8090/validator/v2/";
var serverCaptchaURL = "http://localhost:8090/validator/captcha/verify";
var swaggerURL = "http://localhost:8090/validator/swagger-ui.html"

A simple solution would be to only include the path, not the server/domain part so the frontend would call the service that it's hosted on:

var serverURL = "/validator/v2/";
var serverRealURL = "/validator/v2/";
var serverDirectURL = "/validator/v2/";
var serverCaptchaURL = "/validator/captcha/verify";
var swaggerURL = "/validator/swagger-ui.html"

What is your take on the container that is hosted on https://github.com/INSPIRE-MIF/helpdesk-validator/pkgs/container/helpdesk-validator%2Finspire-validator? Should it not be used as is, but users should create their own dockerfile/with their own UI.zip instead? Or am I missing something that would let me specify the domain the service is running in?

image

Metadata

Metadata

Labels

deploymentThis issue is about the deployment of the Docker image, WAR file or operational environmentunder analysis

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions