Skip to content

Instantly share code, notes, and snippets.

@andodet
Created March 7, 2020 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andodet/c9f4c37cdf6624349394ef985c369fb9 to your computer and use it in GitHub Desktop.
Save andodet/c9f4c37cdf6624349394ef985c369fb9 to your computer and use it in GitHub Desktop.
Replacing docker RUN cmds with a .sh script
#!bin/sh
echo "options(renv.consent=TRUE)" >> .Rprofile
# Install R dependencies
sudo R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))" \
&& R -e "remotes::install_github('rstudio/renv')" \
&& R -e "renv::restore(confirm = FALSE)"
# Render reports
Rscript ./R/main.R
# Copy reports and dashboards
sudo cp -r ./reports /srv/shiny-server/reports \
&& cp -r shiny/* /srv/shiny-server/reports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment