-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDeploy_CCISS.R
19 lines (18 loc) · 1.2 KB
/
Deploy_CCISS.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
library(analogsea)
Sys.setenv(DO_PAT="eae4166ed2fac0e3c41660fe26a009bb0176ab8bceeaf753faf5189f58a06520")
library(ccissr)
server <- analogsea::droplets()$`shiny-server`
reset_ssh_sessions()
#analogsea::droplet_ssh(server,"rm -R /srv/shiny-server/ccissr/.Renviron")
analogsea::droplet_ssh(server, "rm -R /srv/shiny-server/cciss13")
analogsea::droplet_ssh(server, "mkdir /srv/shiny-server/cciss13")
analogsea::droplet_upload(server, "./.Renviron", "/srv/shiny-server/cciss13")
#analogsea::droplet_ssh(server, "R -e \"remotes::install_github('bcgov/ccissr@development', upgrade = FALSE)\"")
analogsea::droplet_upload(server, "./app/global.R", "/srv/shiny-server/cciss13/global.R")
analogsea::droplet_upload(server, "./app/server.R", "/srv/shiny-server/cciss13/server.R")
analogsea::droplet_upload(server, "./app/ui.R", "/srv/shiny-server/cciss13/ui.R")
analogsea::droplet_upload(server, "./app/www", "/srv/shiny-server/cciss13")
analogsea::droplet_upload(server, "./app/server", "/srv/shiny-server/cciss13")
analogsea::droplet_upload(server, "./app/instructions", "/srv/shiny-server/cciss13")
analogsea::droplet_ssh(server, "chown -R shiny:shiny /srv/shiny-server")
analogsea::droplet_ssh(server, "systemctl restart shiny-server")