I'd like to know the best way for me to deploy Shiny apps to my Netlify-blogdown blog.
I build the blog & website with blogdown & Netlify -- all great, no problems. I have a Digital Ocean droplet with RStudio and Shiny Server -- runs fine, again no problems, when I use the IP. How could I sync the two, or is it possible? (Since DO and Netlify kind of do the same thing, as far as I understand, although I'm far, far, far from an expert on this topic.)
There's a very informative discussion here that suggests that putting apps in iframes works for this purpose, but I was kind of hoping to have a section of my website that could host all my apps.
You will not be able to host shiny on Netlify directly. It supports static websites only.
But with the iframe technique you can integrate an externally hosted shiny app with a static website almost seamlessly.
I also have static pages - hosted on AWS S3 instead of Netlify, makes little difference - and it is very easy to use.
Have a look at http://www.jla-data.net/cze/co-rika-twitter-o-andreji-babisovi/ (the text is in Czech, but irrelevant - a rant on our politicians) and after an inevitable wait you will see a wordcloud app. I think it integrates with the rest of pages quite OK:
The code I use is: <iframe src="https://jlacko.shinyapps.io/vox-andreii/" width="800" height="900" style="border: none;"></iframe>
Where vox-andreii is the name of my app on shinapps.io and jlacko is my username on shinyapps.io (and here, come to that...)
Thanks, @jlacko. (Nice wordcloud!) It seems clear to me now that I cannot directly host my apps on the Netlify part of my website, however, I wonder if there is a workaround. For example, my DO droplet runs fine on the IP, and the blogdown website runs fine on Netlify. Is there a way to get the DO nameservers to point to a subdomain of the site? Like www.robertmylesmcdonnell.com/apps, where the apps part points to the DO droplet. I'm guessing it doesn't work this way, since the main domain points to Netlify, but...
You can do a lot with your nameservers. It might be easier to configure a subdomain than a directory - i.e. have www.robertmylesmcdonnell.com lead to your web pages and apps.robertmylesmcdonnell.com to your application server.
I remember it was not difficult to set up on Route 53, but someone with more Digital Ocean experience than myself (I am more an AWS person) should be able to give you an answer more directly applicable to your situation than I can.
I was not thrilled by the iframe option originally (it conjured up some images of pre-web 2.0 aesthetics), but I have to say it's worked pretty well for me. Out website has an apps/ section, and each page is basically displaying an iframe hosted on amazon, http://nano-optics.github.io/apps/sphere
The iframe solution looks good there, @baptiste, thanks. I was able to find a solution by using the approach set out by @jlacko, i.e. a subdomain. Thanks both for your help!
I am currently struggling with the same issue. Would you mind sharing your solution in more detail? For reasons I havent figured out yet, the iframes solution doesnt seem to work for me. Although it works fine with apps hosted on shinyapps.io