Comments (6)
Hi @ajuancer
I haven't tried this, my suspicion is that the site_dir
path needs to be an absolute path, which in this case will need to be /app/
since that is where your application will be installed by the buildpack (and default of Heroku).
Thus your shiny-servr.conf
file as follows:
server {
location / {
site_dir /app/;
}
}
Let me know if it works.
from heroku-buildpack-r.
Adding to the above, it may be possible to use a relative path for the site_dir
in respect of the location of the shiny-servr.conf
file. I haven't tried this so please let me know it it works for you. This is a better solution, since it is more portable; you can run your Shiny application on your computer and Heroku without any difference to the code.
server {
location / {
site_dir ./;
}
}
from heroku-buildpack-r.
nope! neither the /app/
dir nor the ./
dir worked.
Even using the relative path, RStudio
does not detect the project (but recognizes each of the apps independently, so I can run each app separately). As far as I understand, the only way to test an application directory locally is to install RStudio Server
, as opposed to the simplicity of running a single application server from within RStudio
itself.
The problem that I have when I try to deploy to Heroku is the following:
-----> Building on the Heroku-18 stack
-----> Using buildpack: https://github.com/virtualstaticvoid/heroku-buildpack-r.git
-----> App not compatible with buildpack: https://github.com/virtualstaticvoid/heroku-buildpack-r.git
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
which maybe is related to the fact that none of the usual files are present. This assumption may be more than incorrect, I leave it up to you who really know how this buildpack
works.
Thanks!!
If someone is having the same problem, a temporary solution may be ti use shinydashnoard
.
from heroku-buildpack-r.
Hi @ajuancer
Yeah, the detection logic of the buildpack will result in the "App not compatible with buildpack" error message when at least one of the required files aren't present.
If you can place an empty init.R
in the root of your project, the buildpack will correctly detect your project as an R application.
Apologies, I assumed from initial issue description, that you had been able to deploy the application, and that it was Shiny that wasn't able to load/run the "nested" applications, which lead me to think the issue was the site_dir
path.
From your comment:
As far as I understand, the only way to test an application directory locally is to install RStudio Server.
I did some reading up on Shiny Server and found that it would need to be installed together with your application on Heroku in order to work, and there isn't an easy way to do that unfortunately.
from heroku-buildpack-r.
I've create an example project which uses Heroku's container
stack and the heroku-docker-r image, instead of the buildpack, to demonstrate how to run multiple Shiny applications with the Shiny Server.
from heroku-buildpack-r.
hi there!
I assumed from initial issue description, that you had been able to deploy the application.
I meant that the application was working before I tried to switch from hosting one to multiple applications. Sorry for the confusion!
I have tried creating an empty file server.R
but when I deployed it, I got the push rejected:
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/repo.git'
As this is usually the result of Heroku having seen new versions in the branch in question, I made a git pull
but everything was up to date (as it should be). I tried with git fetch
but no changes happened (again, as it should be). Finally, I decided to lost the project with git reset --hard heroku/main
and created again the files of the issue.
Recreating the scenario, I have faced again with the failed to push some refs to 'https://git.heroku.com/repo.git'
. The error disappears when I copy the run.R
1 of one of the working apps to the root dir (where the empty server.R
is). I pushed the changes and the app was built successful, but when I visit the deployed page, I got the usually RServer error no UI found
.
I created an index.html
in a new www
dir and deployed it again. Now the server serves that page, but when I navigate to /app1
or /app2
I get a not found response.
As this error remains, I decided to clone your example. Yep! All working nice! 😄 As I have said before, I have no important code in the project so I will start again based on your example.
I leave it up to you to close the issue in case you want to add something.
Thank you very much for all you have done, I really appreciate the effort.
[1]: Continuing the debugging I also tried with one of the server.R
of one of the working apps but I got again the refs error
. run.R
does not contain anything special, and the fact that I can deploy the app with it at the root dir and not with the server.R
file is the least I understand about this error.
from heroku-buildpack-r.
Related Issues (20)
- I would really appreciate a walkthrough for a regular R user HOT 3
- renv 12 in my renv.lock file breaks the 'compilation' HOT 5
- GPG error HOT 3
- Rplumber test application delivers error HOT 5
- Increasing timeout HOT 1
- Support heroku-20 stack HOT 1
- Building with dokku HOT 2
- IsoSpecR not installed
- Skip BUILD_DIR to /app rsync when building in /app
- There is no package called 'renv' HOT 2
- Timeout when installing HOT 3
- Slow build time - Caching issue? HOT 2
- Authentication/Browser Problem when deployed. HOT 7
- Add Support for Heroku-22 HOT 9
- Add telegram.bot example and default packages HOT 6
- Use reticulate package HOT 1
- Aptfile installation fails HOT 1
- Could I use cloud native build packs? HOT 2
- renv 1.0.2 Error in if (n == 1) word else paste(word, "s", sep = ""): app[web.1]: the condition has length > 1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-r.