deploy_app: Deploy Shiny application

Description Usage Arguments Value Examples

View source: R/deploy_app_generic.R View source: R/deploy_app.R

Description

Deploy Shiny application

Deploy Shiny application

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
deploy_app(gh_organization = "OHI-Science", gh_repo, gh_shiny_dir = NULL,
  gh_branch_app = "master",
  app_base_url = "http://ohi-science.nceas.ucsb.edu",
  app_name_remote = NULL, app_server, install_pkgs = FALSE,
  dir_server = "/srv/shiny-server", dir_local = tempdir())

deploy_app(gh_organization = "OHI-Science", gh_repo, gh_shiny_dir = NULL,
  gh_branch_app = "master",
  app_base_url = "http://ohi-science.nceas.ucsb.edu",
  app_name_remote = NULL, app_server, install_pkgs = FALSE,
  dir_server = "/srv/shiny-server", dir_local = tempdir())

Arguments

gh_organization

Github organization. Defaults to "OHI-Science".

gh_repo

Github repository

gh_branch_app

Github branch to contain the app. Defaults to "app" and does not have to already exist in the repo.

app_server

the secure copy (scp) server location given by username@server:/dir/

dir_server

directory on the app_server

dir_local

top-level directory to use for populating git repo folder and branch subfolders within, defaults to tmpdir()

scenario_dirs

character vector of subfolders from the data branch that will be scenarios available for display. The first one will become the default viewed.

study_area

place name of the entire study area

gh_owner

Github owner. Defaults to "OHI-Science".

gh_branch_data

Github branch containing data. Defaults to "draft" and must already exist in the repo.

app_url

URL of the application

projection

defaults to Mercator, or could be specified as Mollweide, which may be more appropriate for global results

map_shrink_pct

percentage of shrinkage to apply to study area for default map view

run_app

run the Shiny app locally

open_url

open the web browser to the app_url

dir_out

top-level directory to use for populating git repo folder and branch subfolders within, defaults to tmpdir()

del_out

whether to delete output directory when done, defaults to TRUE

gh_data_commit

commit of gh_branch_data for freezing the app, ie do not automatically update

gh_repo

Github repository

gh_branch_app

Github branch that contains the app. Defaults to "master" and does not have to already exist in the repo.

app_url

URL of the application

app_server

the secure copy (scp) server location given by username@server:/dir/

run_app

run the Shiny app locally

open_url

open the web browser to the app_url

del_out

whether to delete output directory when done, defaults to TRUE

dir_server

directory on the app_server

gh_data_commit

commit of gh_branch_data for freezing the app, ie do not automatically update

Value

Returns URL of Shiny app if successfully deployed, otherwise errors out. Requires git credentials to push to Github repository, and SSH keys for secure copying to server. Suggestions to update Shiny app:

  1. Ensure permissions are set for you and shiny on fitz: ssh jstewart@fitz sudo chown -R jstewart /srv/shiny-server/ohi-global sudo chmod -R 775 . sudo chgrp -R shiny .

Returns URL of Shiny app if successfully deployed, otherwise errors out. Requires git credentials to push to Github repository, and SSH keys for secure copying to server. Suggestions to update Shiny app:

  1. Ensure permissions are set for you and shiny on fitz: ssh jstewart@fitz sudo chown -R jstewart /srv/shiny-server/ohi-global sudo chmod -R 775 . sudo chgrp -R shiny .

  2. Copy your repo to dir_local locally. For example, if input argument dir_local = '~/Desktop/ohirepos_tmp', copy '~/github/ohi-global' to dir_local = '~/Desktop/ohirepos_tmp/ohi-global/draft'.

Please also visit =https://github.com/OHI-Science/ohirepos/blob/master/inst/app/README.mdapp/README.md for more details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
deploy_app('ohi-global', 'Global', c('eez2015','eez2012','eez2013','eez2014','eez2016'), projection='Mollweide')
deploy_app(       'bhi', 'Baltic', 'baltic2015')

## End(Not run)
## Not run: 
deploy_app('ohi-global', 'Global', c('eez2015','eez2012','eez2013','eez2014','eez2016'),
  projection = 'Mollweide')
deploy_app(       'bhi', 'Baltic', 'baltic2015')

## End(Not run)

OHI-Science/ohirepos documentation built on Oct. 7, 2021, 7 p.m.