-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add developer docs #7
Comments
We installed the Shinny app the configurations are in Ngnix config file:
restart server |
On the local server running the shiny app, we update the local repository using a cronjob every 20 minutes by running |
with the update to portalcasting v 0.53.0 having either installed the portalcasting package (e.g., via `remotes::install_github("weecology/portalcasting", remotes is preferable to devtools, as it is targeted for the downloading of packages and is much lighter weight) or operating within the docker container for the package, one should be able to run
every single time, including the first. which is to say that "update_dir" will create the directory if it's not there. it does, however, default to normal settings, which do not include the full archive download, which the app needs. i will eventually make an update_production and update_sandbox spin-off of update_dir, but they don't exist yet, so you have to use the generic function with the specific settings list. at this point, given that the app code is all encompassed within the (containerized) package, and all the R installations in the original post above can be removed the same goes for the external -to-R libraries... at least the ones that were only required for building the site, as they are now included in the image... this does also assume that we're using the image to build and serve the app, which i'm not sure on. the docker image is based on the rocker/tidyverse:latest image, which includes all of the above-listed apt libraries (and many many more) an important update with the new portalcasting version as well is that the app files are all now within a subdirectory called i'm also wondering if we can actually move the build of the app to github actions, off of the local server. that's pretty straightforward to run these days, and there isn't much in the way of overhead to where i think it needs to be on a local server . that would make it much easier for me to work with and update the content as needed for any upstream changes. but if it needs to stay on it, that's fine to. |
Can you clarify what you mean by build in this case. It's been a while, but I think we're basically pulling down the most recent versions of things and restarting shiny (but the cronjob is in @henrykironde's account so I can't confirm). |
yeah, build in the spinning up of the live application. more or less what is being talked about in this post, in terms of the CRON runner that's executing that update (collecting updated content, generating the website, serving it to nginx) every day. |
This is the part where I don't understand how we move it to GitHub Actions since it's a shiny app not a static site. |
ah ok, i think i get where your very understandable confusion comes in. it's manageable through deploying an executable container that actually spins up the app when loaded (via the CMD instruction in the dockerfile). i'm definitely including this as the end step in the toy example i've pulled out to fully develop the workflow (see https://github.com/dapperstats/ShinyDocker) since there is obviously too much going on in portalcasting to really develop a new workflow like that (see weecology/portalcasting#330) the 'toy' is almost certainly going to be an important testing ground for some fundamentals we implement in the portal framework. so maybe more 'nascent template' than 'toy'? |
with https://github.com/weecology/portalcasting/releases/tag/v0.54.0 we now have
|
at this point now, i think the developer docs regarding the website code itself can be located in portalcasting (since one can spin up a local version of the website or even serve a built version to a remote location without even knowing about this repo) but the developer docs regarding the deployment are still needed. |
On serenity first install
sudo apt-get -y install libcurl4-gnutls-dev libxml2-dev libssl-dev
sudo apt-get install libssl-dev
sudo apt-get install openssl
sudo su -c "R -e "install.packages(c('pillar', 'utf8', 'pillar', 'tidyselect', 'rmarkdown', 'dplyr', 'ltsa', 'tscount', 'yaml'),)""
Then install these packages, some may still fail since they the dependencies need to be manually installed
sudo su -c "R -e "install.packages('devtools')""
sudo su -c "R -e "install.packages('shiny')""
sudo su -c "R -e "install.packages('dplyr')""
sudo su -c "R -e "install.packages('ggplot2')""
sudo su -c "R -e "install.packages('portalr')""
sudo su -c "R -e "install.packages('stats')""
sudo su -c "R -e "install.packages('lubridate')""
sudo su -c "R -e "install.packages('forecast')""
sudo su -c "R -e "devtools::install_github('weecology/portalcasting')""
shiny::runApp()
The text was updated successfully, but these errors were encountered: