shiny-server | My personal Shiny server | Data Visualization library
kandi X-RAY | shiny-server Summary
kandi X-RAY | shiny-server Summary
Copyright 2016 Dean Attali. Licensed under the MIT license. This repo contains the setup of my Shiny server. It is a git repo under /srv/shiny-server on my server. To learn how you can get your own Shiny Server in a similar way, read my tutorial about how to set up Shiny Server. Shiny servers can host shiny apps and R markdown documents. The config directory contains a few configuration files that are used on the server. Original author: Dean Attali deanattali.com.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of shiny-server
shiny-server Key Features
shiny-server Examples and Code Snippets
Community Discussions
Trending Discussions on shiny-server
QUESTION
I am relatively new to shiny-server configuration. Currently there are a bunch of apps being hosted on shiny-server at the root level which can be accessed via http://:3838/appName
. I want to allow a service account to be able to deploy apps and be able to check the log files. The service account does not and will not have sudo access. The service account has already been added to a group called shinyUsers
. While doing so I still want to make sure the apps currently deployed at root level are still operational and do not get impacted by the change in configuration.
Reading through the configuration guide I get some of the bits around deploying personal applications. However I am unsure about what to add for the site_dir
and log_dir
keys.
Below is my configuration file so far:
...ANSWER
Answered 2022-Feb-08 at 15:18The below configuration will still keep the root apps running (albiet with a small change in the url) and also provide access to the service account to be able to host apps. The apps need to be in a directory called ShinyApps
and the log files will automatically enter a log
subdirectory within ShinyApps
the root level apps will be on the url: http://myserver/appName
and the service account apps will be on the url: http://myserver/serviceAccountName/appName
. This is because I have included the server name myserver
in the below config (use the actual server name here).
QUESTION
I have packaged an R Shiny application in docker and deployed it to AWS ECS on a Fargate instance with an application load balancer whose listener holds the SSL certificate. I can see that the task is running and healthy, but when I go to the URL after some idle period, it takes a full 30 seconds to load (again, this is not from the instance startup/provisioning time since it is already up and healthy). I can then open up a new browser and go to the same link, and it will load immediately. What could be causing this? I'm honestly not even sure what to search.
Note: When I run the container locally, the app does take a few seconds to start, but that is only when the container initially starts. It runs very quickly after that initial startup time regardless of idle time. Therefore, I don't think it's shiny-server. The instances that I am referring to above are already running, and I would expect them to behave accordingly.
I read about load balancer idle timeout, but would that take 30 seconds to reconnect after it ends the connection? I'm not very experienced when it comes to the inner workings of web apps, but it seems unlikely. At the same time, it seems like increasing the idle timeout did help, but the behavior is kind of erratic so that might just be confirmation bias.
I can provide more details about the configuration if needed. I just hoped that someone might know what details I should share instead of sharing my entire Terraform directory.
...ANSWER
Answered 2021-Nov-08 at 01:41I ended up solving this by noticing that only one of my two associated subnets was public. If you have a public load-balancer, you need to have both of the associated subnets public as well (and private if private...)
QUESTION
I hope you are well.
I need your help please.
My own shiny-server app is similar to this app and I would like to add to mine a downloadButton at the top :
ANSWER
Answered 2021-Oct-11 at 22:42Here you go :)
QUESTION
I am deploying a docker container using Google Cloud Run. The docker container contains a R shiny app. And after a while from viewing the app, I see in the Cloud Run logs, the following:
...ANSWER
Answered 2021-Aug-31 at 03:52Check your /usr/bin/shiny-server.sh
. To change ownership recursively on all files and directories on a given directory, you should use -R option. Additionally, when changing ownership for both user and group in a single command, you should use a colon.
In /usr/bin/shiny-server.sh try this:
QUESTION
I am currently hosting a number of shiny apps on a shiny-server open source on a centos7 distro. All the apps were/are working fine but for one of the apps when I try to go to the url I get the following message:
This page isn't working did not receive any data. ERR_EMPTY_RESPONSE.
All the other shiny apps hosted on the same shiny server are working just fine. I checked /var/log/shiny-server
and there is no log file for this App. As the other apps are working fine, I dont think its a port issue.
The only difference between other apps and this one is that it was used the most by its users. Is there some restriction/limit on shiny-server for runtime? I can't figure out what the problem is. The app runs fine on RStudio Server and if I copy it into a new directory in /srv/shiny-server/
with a different name, it also works fine.
ANSWER
Answered 2021-Sep-10 at 20:53A couple of thoughts:
- If a process closes successfully, then shiny deletes the log files. So it's possible you may be missing some log files. You may override this with
preserve_logs
, see here. Your users may be triggering some error through their interactions with the app, but other sessions are successful, so shiny deletes the log files. - Shiny creates one process per app be default, but an unlimited number of session (see here). This means that if your app is the one that is used the most by users, each user is generating a new session. And if the app is computationally intensive, then some of the user sessions may be getting backlogged which might trigger the ERR_EMPTY_RESPONSE. You can fix this by using Docker to spin up a process for each user. Here are some options, I've found shinyproxy to be the most intuitive.
QUESTION
I am not new to programming, but I am very new to R Shiny.
A web portal will be linking to my R Shiny app (the app will be deployed to a shiny-server in a docker container), and the web portal will be passing some query string parameters to my app - an auth0 token, aud value, and the auth0 url where I should validate the token.
What I want to happen is once my app starts up, it gets the query parameters from the query string, validates the token with the auth0 url, and check that the "aud" value matches what is in the validated token.
I also want catch any errors and show just a "403 Forbidden" text . Currently, I've been bashing my head around trying to get this to work, but because of my limited experience with R and shiny, I have very little that works in my code. Any thorough explanation of code solutions would be super helpful.
What I have so far
...ANSWER
Answered 2021-Aug-16 at 18:55With the help of @MrFlick's suggestion, I was able to get this to work the way I wanted it to. This is what I did:
in the ui function, here are my divs:
QUESTION
FYI - I am an absolute newbie when it comes to shiny apps, but I am trying to help a shiny app developer deploy their app using a docker container (also a newbie with docker but I've done a few of them so I understand what is going on).
I have a shiny app, being deployed on a shiny-server in a docker container. This shiny app is using auth0, and I am following this write up (https://github.com/curso-r/auth0) so that the _auth0.yml file will get its secrets from environment variables.
Problem lies in how to correctly setup those environment variables in the docker container so that my _auth0.yml file will be populated with their values? Any help would be greatly appreciated!
I have tried setting "ENV" in my Dockerfile,
...ANSWER
Answered 2021-Jul-26 at 19:11So technically, I figured out how to solve this. I created an ".Renviron" file at the root of my project, saved all of my environment variables in the file, then copied it into my docker image.
When I started my container, I was able to successfully run my application, with the data from the .Renviron supplied so that the app could connect to auth0 to authenticate user.
Now I need to figure out how to pass in this file to the docker container so that this .Renviron file gets pulled in securely, and not have to check this into a repo like github.
QUESTION
I have a shinyApp running on cloud that runs for long (lots of computation taking about 25 minutes) leading to timeout. However, If I keep interacting with the page as the app runs (e.g. navigating the navbar or moving a slider..), timeout does not happen. A possible solution is to keep the web-socket active by updating a value on the current page every 5 seconds or so. I borrowed the idea here https://community.rstudio.com/t/keep-shiny-app-running-in-shiny-server-no-greying-out/27784/4.
...ANSWER
Answered 2021-May-26 at 06:29I managed to find a workaround that keeps the R/Shiny web page active even as intensive workloads run in server.R. I would like to share my working solution.
The first step is to create a div tag or object inside shiny's UI, fluidPage() section. I have a assigned "time_stamp" id to it.
QUESTION
Say that I have this code (which is modified from OpenStreetMaps autoplot error in RStudio Server and Shiny Server in R4.0.0):
...ANSWER
Answered 2021-May-25 at 10:17I obtained the bbox information from the mp object as follows:
QUESTION
I'm building a WebApp with a SQL DB as Backend. I'm Deploying the both parts on Azure, as Azure Webapp and SQL Server.
The SQL server is sercured with Azure AD (AAD). So only Users in a Group can access the DB.
So I'm trying to setup a workflow where the Webapp login the user and collect his Access token. And then uses the token to Query the SQL server.
I've registreted the App in AAD, where it is authorized to read the user ID and impersonate as the user.
I've the following code which is working local. But I can't get it to work deployed locally in a Docker Image.
...ANSWER
Answered 2021-May-17 at 16:06Connecting to SQL Server with an OAuth token requires use of a pre-connection attribute (basically a pointer to the token string). There is an open feature request at the odbc Github repo for this. I encourage you to upvote it, hopefully if it's popular enough it will get implemented.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install shiny-server
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page