Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't add favicon when shinyproxy is in container #163

Closed
kuzmenkov111 opened this issue Jul 10, 2019 · 2 comments
Closed

can't add favicon when shinyproxy is in container #163

kuzmenkov111 opened this issue Jul 10, 2019 · 2 comments

Comments

@kuzmenkov111
Copy link

kuzmenkov111 commented Jul 10, 2019

Hello!

I can't add favicon.png when ShinyProxy is running as docker container.

Dockerfile:
`FROM openjdk:8-jre

RUN mkdir -p /opt/shinyproxy/
RUN wget https://www.shinyproxy.io/downloads/shinyproxy-2.3.0.jar -O /opt/shinyproxy/shinyproxy.jar
COPY application.yml /opt/shinyproxy/application.yml

RUN mkdir /opt/shinyproxy/templates
ADD templates /opt/shinyproxy/templates
ADD favicon.png /opt/shinyproxy/favicon.png

WORKDIR /opt/shinyproxy/
CMD ["java", "-jar", "/opt/shinyproxy/shinyproxy.jar"]`

And application yml:
`spring:
servlet:
multipart:
max-file-size: 300MB
max-request-size: 300MB
proxy:
title: Myapp
template-path: ./templates/1col
favicon-path: /opt/shinyproxy/favicon.png
logo-url: http://www.openanalytics.eu/sites/www.openanalytics.eu/themes/oa/logo.png
landing-page: /
port: 8080
authentication: webservice
webservice:
authentication-url: http://127.0.0.1:9010/api/auth/check
authentication-request-body: "{email: '%s', password: '%s'}"
hide-navbar: true
admin-groups: admins
container-backend: docker
docker:
internal-networking: true
container-memory-limit: 400m
specs:

  • id: 01_hello
    display-name: Hello Application
    description: Application which demonstrates the basics of a Shiny app
    container-cmd: ["R", "-e", "shinyproxy::run_01_hello()"]
    container-image: openanalytics/shinyproxy-demo
    container-network: amrcloud-net
  • id: 06_tabsets
    container-cmd: ["R", "-e", "shinyproxy::run_06_tabsets()"]
    container-image: openanalytics/shinyproxy-demo
    container-network: amrcloud-net
    logging:
    file:
    shinyproxy.log`

Maybe something is wrong with configuration files?

@michaelhogersosis
Copy link

michaelhogersosis commented Jul 10, 2019

Hi,

Can you try favicon-path: favicon.png? I glanced at one of our config files which used a similar Dockerfile.

Depending on your setup, you can run your applications with app_direct/ (no iframe) instead of app/ (iframe) and then add the favicon to the Shiny application's head section. Of course, the login page of ShinyProxy would still have a favicon that needs to be customised then.

Best regards,

Michael

@kuzmenkov111
Copy link
Author

kuzmenkov111 commented Jul 10, 2019

Many thanks!!!
It is solved.

  1. when I use app_direct/my_app for direct access to shiny app without iframe I should add tags$head(tags$link(rel = "icon", type = "image/png", href = "favicon.png")) to shiny app. It's work!
  2. when I use custom login template, I should add <link rel="shortcut icon" href="/assets/img/favicon.png" type="image/png"> to login.html file.

FYI
There is some info about login page modification
#148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants