openanalytics / shinyproxy

ShinyProxy - Open Source Enterprise Deployment for Shiny and data science apps
https://www.shinyproxy.io
Apache License 2.0
514 stars 152 forks source link

Configuration files inside docker volume #508

Open ConYel opened 3 weeks ago

ConYel commented 3 weeks ago

Hello and thank you for this very useful tool!

I am having trouble to connect to shinyproxy when I try to use a "users.yml" file and authentication "simple". I run the docker with volumes:

-v ./application.yml:/opt/shinyproxy/application.yml -v ./users.yml:/opt/shinyproxy/users.yml -v logo.png:/opt/shinyproxy/logo.png docker.io/openanalytics/shinyproxy:3.0.2

in the application.yml I have put:

spring: config: import:

Furthermore I have the same issue when I put a custom logo.

Are the volumes wrongly pointed? or is there any other way to configure it? I have posted the question here #https://github.com/openanalytics/shinyproxy-docker/issues/1#issue-2388203320 too

LEDfan commented 2 weeks ago

Hi, for the logo you'll have to provide an absolute path to the logo, prefixed by file://, e.g.:

proxy:
    logo-url: file:///opt/shinyproxy/logo.png

The spring.config.import syntax is only supported since ShinyProxy 3.1.0, therefore please upgrade to ShinyProxy 3.1.1

ConYel commented 2 weeks ago

Hello and thank you for the prompt reply. Inside the docker volumes, where should the config files exist?

LEDfan commented 2 weeks ago

The /opt/shinyproxy/users.yml location you used is fine, you can then use:

spring:
  config:
    import:
     - users.yml
ConYel commented 2 weeks ago

Regarding the logs from shinyproxy, where should be pointed a specific volume so we can get them written on the host?

LEDfan commented 2 weeks ago

You can configure the location of the logs, see: https://shinyproxy.io/documentation/configuration/#basic-settings

e.g. if you add

logging:
  file:
   name: logs/shinyproxy.log

the logs will be in /opt/shinyproxy/logs and you can mount this directory as volume.