Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

adding the application logs to the stdout #43

Merged
merged 4 commits into from
Aug 24, 2018

Conversation

smnbbrv
Copy link
Contributor

@smnbbrv smnbbrv commented Aug 23, 2018

The application logs should go to stdout to conform the docker as a service requirements.

E.g. when the container gets deployed to the Kubernetes cluster, the logs become inaccessible. Developing locally is also painful because the logs get removed all the time etc.

The solution presented here is not ideal, however it solves the main problem: logs are written to stdout.

You can test the solution from my branch by

docker build -t shiny-local .
...
docker run -p 3838:3838 shiny-local

@cboettig
Copy link
Member

@smnbbrv Thanks for raising this issue. I believe that currently the logs for the shiny server are written to stdout (thus in the docker container log, while logs for the apps are being written to /var/log/shiny-server/. It's not clear to me that mixing the logs of the apps and the logs of the server would generally be desired.

The README is admittedly a bit confusing on this point and should at least be clarified, but I think the volume mapping approach shown there or something similar would be the preferred way to easily access the app logs.

It might be better to discuss this in an issue first?

@smnbbrv
Copy link
Contributor Author

smnbbrv commented Aug 23, 2018

Hi @cboettig

thanks for a quick reply. I created an issue, tried to describe the use case and cover your comments, please go on there.

@cboettig
Copy link
Member

@smnbbrv as I mention in #44, this looks like a good solution to me, but I think it should be the new default (opt out rather than opt in).

On a technical note, we use automated builds on hub to build all the version tags, which I think means each of those sub-dirs will also need an updated copy of shiny-server.sh. I should probably at least have a makefile to automate that, though maybe there's a better way.

@smnbbrv
Copy link
Contributor Author

smnbbrv commented Aug 24, 2018

Hi @cboettig

just updated the PR according to your comments. If it feels a bit dirty (4 commits) I can make a clean new fork & repeat the PR.

I guess every of those versioned Dockerfiles also need to be updated in order to install xtail; Makefile could be very helpful here.

@cboettig
Copy link
Member

LGTM. yeah, i'll sync the versions. Thanks again for doing this.

@cboettig cboettig merged commit 95339e7 into rocker-org:master Aug 24, 2018
cboettig added a commit that referenced this pull request Aug 24, 2018
@smnbbrv
Copy link
Contributor Author

smnbbrv commented Aug 25, 2018

thank You for support and understanding!

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

Successfully merging this pull request may close these issues.

None yet

2 participants