rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

Shiny app logs to stdout with rocker/verse:3.6.2 and ADD=shiny #205

Closed stevenranney closed 4 years ago

stevenranney commented 4 years ago

I'm using this Dockerfile to host a Shiny app that pulls a bunch or data from a db and returns Beamer slides and an .xlsx. I went with rocker/verse because it has the publication necessities and used RUN export ADD=shiny && bash /etc/cont-init.d/add to add Shiny server to the container. This container is being deployed to AWS Fargate, though, and I'll need to review the application logs. For the life of me, I can't figure out why everything I've tried won't send the app logs to stdout.

Note that this essentially a doubling of my question on StackOverflow but given that writing app logs to stdout is now the default behavior with rocker/shiny, I wonder if identical behavior would be expected with ADD=shiny? Is this not the case?

cboettig commented 4 years ago

Correct, it is not identical.

Remember that there is more going on in a container that is running both rstudio and shiny than one dedicated to shiny. I see the logic of your request, but arguably a user might also expect the rstudio container log behaviour to be consistent with that of other rstudio containers rather than with the separate shiny stack.

The rstudio containers run the S6 init system which handles both of these tasks, and can easily be extended to run other services as well (e.g. ssh server, etc). You can configure the startup, shutdown, and logging behaviour of different apps, see https://skarnet.org/software/s6/

HTH!