openanalytics / containerproxy

Manage HTTP proxy routes into Docker containers
Apache License 2.0
43 stars 66 forks source link

Shinyproxy Produces a Warning when Starting if Passing in `--spring.config.location` via CLI #84

Closed RealTYPICAL closed 2 months ago

RealTYPICAL commented 7 months ago

eu/openanalytics/containerproxy/ContainerProxyApplication.java:127

boolean hasExternalConfig = Files.exists(Paths.get(CONFIG_FILENAME));
if (!hasExternalConfig) {
    app.setAdditionalProfiles(CONFIG_DEMO_PROFILE);
    Logger log = LogManager.getLogger(ContainerProxyApplication.class);
    log.warn("WARNING: Did not found configuration, using fallback configuration!");
}

As far as I understand, Spring can find an application.yml in a great many places, however the current code warns that it is only respected if it's in the same working directory as the containerproxy. Passing it in via the CLI like --spring.config.location=/my/great/path does still work but containerproxy spits out a warning.

Is it possible to only produce this warning if Spring cannot find an application.yml?

Looking forward to hearing from you.

LEDfan commented 2 months ago

Hi, thanks for reporting this. This is now fixed in the latest release we made. We also updated our documentation to include this option: https://shinyproxy.io/documentation/configuration/#spring.config.location . Please be aware that not all methods provided by spring are fully supported by ShinyProxy.