Hey all,
I’m facing a strange behaviour, which I can’t really classify.
I’m using shinyproxy in a dockerd environment with a nginx proxy for adding tls decryption (ubuntu server). In principle this setting is working fine for deploying shiny-apps.
My problem occurs when building the shiny app with latest development builds directly from GitHub instead of the stable CRAN version.
When building shiny by devtools from github the app is not running appropriate, because the browser is not able to load any js or css code.
Example from debugging console of the browser:
GET https://shiny.example.com/endpoint/8ea69e1c-3d20-4660-95ee-c433bab8a569/shared/strftime/strftime-min.js net::ERR_ABORTED 404 (Not Found)
The strange thing is, that the same app (build with github version) is working fine when you connect shinyproxy in raw http-mode on the bonded port, in my case http://shiny.example.net:8082
Can anybody reproduce that behaviour and classify the problem if it caused by the shiny-package, by shinyproxy or maybe by any other settings?
Here a short example.
I used “006-tabsets”-example in connection with the building instructions from the shinyproxy-template.
Dockerfile for the working container:
FROM openanalytics/r-base
# system libraries of general use
RUN apt-get update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libssh2-1-dev \
libssl1.0.0
# system library dependency for the euler app
RUN apt-get update && apt-get install -y \
libmpfr-dev
# basic shiny functionality
RUN R -e "install.packages('shiny', repos='https://cloud.r-project.org/')"
#RUN R -e "install.packages('devtools', repos='https://cloud.r-project.org/')"
#RUN R -e "devtools::install_github('rstudio/shiny')"
# copy the app to the image
RUN mkdir /root/tabsets
COPY tabsets /root/tabsets
COPY Rprofile.site /usr/lib/R/etc/
EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/root/tabsets')"]
Dockerfile for the not working container
FROM openanalytics/r-base
# system libraries of general use
RUN apt-get update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libssh2-1-dev \
libssl1.0.0
# system library dependency for the euler app
RUN apt-get update && apt-get install -y \
libmpfr-dev
# basic shiny functionality
#RUN R -e "install.packages('shiny', repos='https://cloud.r-project.org/')"
RUN R -e "install.packages('devtools', repos='https://cloud.r-project.org/')"
RUN R -e "devtools::install_github('rstudio/shiny')"
# copy the app to the image
RUN mkdir /root/tabsets
COPY tabsets /root/tabsets
COPY Rprofile.site /usr/lib/R/etc/
EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/root/tabsets')"]
application.yml:
proxy:
title: ShinyProxy
#hide-navbar: true
port: 8080
authentication: simple
admin-groups: admins
users:
- name: jack
password: password
groups: admins
docker:
internal-networking: true
specs:
- id: tabsets_cran
display-name: working version
container-cmd: ["R", "-e", "shiny::runApp('/root/tabsets')"]
container-image: tabsets_cran
container-network: shiny-gate
- id: 06_tabsets_github
display-name: not working version
container-cmd: ["R", "-e", "shiny::runApp('/root/tabsets')"]
container-image: tabsets_github
container-network: shiny-gate
logging:
file:
shinyproxy.log