From a7a17c6d40a58352fbb9ac0b45dbb2cef32be8cd Mon Sep 17 00:00:00 2001 From: David Giesemann Date: Sun, 16 Oct 2022 22:34:11 +0200 Subject: [PATCH] Umbau zu Docker-Container --- Dockerfile | 35 ++++++++++++++++++ .gitignore => app/.gitignore | 0 LICENSE => app/LICENSE | 0 {R_scripts => app/R_scripts}/doc.R | 0 .../R_scripts}/functions/fun_data.R | 0 .../R_scripts}/functions/fun_graphics.R | 0 .../R_scripts}/functions/fun_kEstimation.R | 0 .../R_scripts}/functions/fun_sapflow.R | 0 .../R_scripts}/functions/fun_ui.R | 0 .../R_scripts}/functions/fun_ui_about.R | 0 .../R_scripts}/functions/fun_ui_data.R | 0 .../R_scripts}/functions/fun_ui_k_value.R | 0 .../R_scripts}/functions/fun_ui_sap_flow.R | 0 .../R_scripts}/functions/fun_ui_settings.R | 0 SapFlowTool.Rproj => app/SapFlowTool.Rproj | 0 {data => app/data}/default_Avicennia_g.csv | 0 {man => app/man}/des_data.md | 0 {man => app/man}/des_data_filter.md | 0 {man => app/man}/des_k_diagrams.md | 0 {man => app/man}/des_k_diagrams2.md | 0 {man => app/man}/des_k_value.md | 0 {man => app/man}/des_main_guide.md | 0 {man => app/man}/des_main_meth.md | 0 {man => app/man}/des_main_out.md | 0 {man => app/man}/des_main_rm.md | 0 {man => app/man}/des_sf_metrics.md | 0 {man => app/man}/des_sf_twu.md | 0 readMe.md => app/readMe.md | 0 server.R => app/server.R | 0 set-up.R => app/set-up.R | 14 +++---- ui.R => app/ui.R | 0 {www => app/www}/Nadezhdina_2018_fig1.png | Bin {www => app/www}/hfd_principle.png | Bin {www => app/www}/project-settings.js | 0 {www => app/www}/stemProfile.png | Bin {www => app/www}/styles.css | 0 36 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 Dockerfile rename .gitignore => app/.gitignore (100%) rename LICENSE => app/LICENSE (100%) rename {R_scripts => app/R_scripts}/doc.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_data.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_graphics.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_kEstimation.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_sapflow.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_ui.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_ui_about.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_ui_data.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_ui_k_value.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_ui_sap_flow.R (100%) rename {R_scripts => app/R_scripts}/functions/fun_ui_settings.R (100%) rename SapFlowTool.Rproj => app/SapFlowTool.Rproj (100%) rename {data => app/data}/default_Avicennia_g.csv (100%) rename {man => app/man}/des_data.md (100%) rename {man => app/man}/des_data_filter.md (100%) rename {man => app/man}/des_k_diagrams.md (100%) rename {man => app/man}/des_k_diagrams2.md (100%) rename {man => app/man}/des_k_value.md (100%) rename {man => app/man}/des_main_guide.md (100%) rename {man => app/man}/des_main_meth.md (100%) rename {man => app/man}/des_main_out.md (100%) rename {man => app/man}/des_main_rm.md (100%) rename {man => app/man}/des_sf_metrics.md (100%) rename {man => app/man}/des_sf_twu.md (100%) rename readMe.md => app/readMe.md (100%) rename server.R => app/server.R (100%) rename set-up.R => app/set-up.R (69%) rename ui.R => app/ui.R (100%) rename {www => app/www}/Nadezhdina_2018_fig1.png (100%) rename {www => app/www}/hfd_principle.png (100%) rename {www => app/www}/project-settings.js (100%) rename {www => app/www}/stemProfile.png (100%) rename {www => app/www}/styles.css (100%) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc1fc0c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM rocker/shiny-verse + +RUN apt-get update && apt-get install -y --no-install-recommends \ + sudo \ + cmake \ + libcurl4-gnutls-dev \ + libcairo2-dev \ + libxt-dev \ + libssl-dev \ + libssh2-1-dev + +RUN rm -rf /var/lib/apt/lists/* +RUN rm -rf /tmp/downloaded_packages + +RUN install2.r --skipinstalled --error --deps TRUE shinydashboard +RUN install2.r --skipinstalled --error --deps TRUE shinycssloaders +RUN install2.r --skipinstalled --error --deps TRUE shinyFiles +RUN install2.r --skipinstalled --error --deps TRUE markdown +RUN install2.r --skipinstalled --error --deps TRUE DT +RUN install2.r --skipinstalled --error --deps TRUE ggpubr +RUN install2.r --skipinstalled --error --deps TRUE scales + +RUN addgroup --system app && adduser --system --ingroup app app + +WORKDIR /home/app + +COPY app . + +RUN chown app:app -R /home/app + +USER app + +EXPOSE 3838 + +ENTRYPOINT R -e "shiny::runApp('/home/app',3838,FALSE,'0.0.0.0')" diff --git a/.gitignore b/app/.gitignore similarity index 100% rename from .gitignore rename to app/.gitignore diff --git a/LICENSE b/app/LICENSE similarity index 100% rename from LICENSE rename to app/LICENSE diff --git a/R_scripts/doc.R b/app/R_scripts/doc.R similarity index 100% rename from R_scripts/doc.R rename to app/R_scripts/doc.R diff --git a/R_scripts/functions/fun_data.R b/app/R_scripts/functions/fun_data.R similarity index 100% rename from R_scripts/functions/fun_data.R rename to app/R_scripts/functions/fun_data.R diff --git a/R_scripts/functions/fun_graphics.R b/app/R_scripts/functions/fun_graphics.R similarity index 100% rename from R_scripts/functions/fun_graphics.R rename to app/R_scripts/functions/fun_graphics.R diff --git a/R_scripts/functions/fun_kEstimation.R b/app/R_scripts/functions/fun_kEstimation.R similarity index 100% rename from R_scripts/functions/fun_kEstimation.R rename to app/R_scripts/functions/fun_kEstimation.R diff --git a/R_scripts/functions/fun_sapflow.R b/app/R_scripts/functions/fun_sapflow.R similarity index 100% rename from R_scripts/functions/fun_sapflow.R rename to app/R_scripts/functions/fun_sapflow.R diff --git a/R_scripts/functions/fun_ui.R b/app/R_scripts/functions/fun_ui.R similarity index 100% rename from R_scripts/functions/fun_ui.R rename to app/R_scripts/functions/fun_ui.R diff --git a/R_scripts/functions/fun_ui_about.R b/app/R_scripts/functions/fun_ui_about.R similarity index 100% rename from R_scripts/functions/fun_ui_about.R rename to app/R_scripts/functions/fun_ui_about.R diff --git a/R_scripts/functions/fun_ui_data.R b/app/R_scripts/functions/fun_ui_data.R similarity index 100% rename from R_scripts/functions/fun_ui_data.R rename to app/R_scripts/functions/fun_ui_data.R diff --git a/R_scripts/functions/fun_ui_k_value.R b/app/R_scripts/functions/fun_ui_k_value.R similarity index 100% rename from R_scripts/functions/fun_ui_k_value.R rename to app/R_scripts/functions/fun_ui_k_value.R diff --git a/R_scripts/functions/fun_ui_sap_flow.R b/app/R_scripts/functions/fun_ui_sap_flow.R similarity index 100% rename from R_scripts/functions/fun_ui_sap_flow.R rename to app/R_scripts/functions/fun_ui_sap_flow.R diff --git a/R_scripts/functions/fun_ui_settings.R b/app/R_scripts/functions/fun_ui_settings.R similarity index 100% rename from R_scripts/functions/fun_ui_settings.R rename to app/R_scripts/functions/fun_ui_settings.R diff --git a/SapFlowTool.Rproj b/app/SapFlowTool.Rproj similarity index 100% rename from SapFlowTool.Rproj rename to app/SapFlowTool.Rproj diff --git a/data/default_Avicennia_g.csv b/app/data/default_Avicennia_g.csv similarity index 100% rename from data/default_Avicennia_g.csv rename to app/data/default_Avicennia_g.csv diff --git a/man/des_data.md b/app/man/des_data.md similarity index 100% rename from man/des_data.md rename to app/man/des_data.md diff --git a/man/des_data_filter.md b/app/man/des_data_filter.md similarity index 100% rename from man/des_data_filter.md rename to app/man/des_data_filter.md diff --git a/man/des_k_diagrams.md b/app/man/des_k_diagrams.md similarity index 100% rename from man/des_k_diagrams.md rename to app/man/des_k_diagrams.md diff --git a/man/des_k_diagrams2.md b/app/man/des_k_diagrams2.md similarity index 100% rename from man/des_k_diagrams2.md rename to app/man/des_k_diagrams2.md diff --git a/man/des_k_value.md b/app/man/des_k_value.md similarity index 100% rename from man/des_k_value.md rename to app/man/des_k_value.md diff --git a/man/des_main_guide.md b/app/man/des_main_guide.md similarity index 100% rename from man/des_main_guide.md rename to app/man/des_main_guide.md diff --git a/man/des_main_meth.md b/app/man/des_main_meth.md similarity index 100% rename from man/des_main_meth.md rename to app/man/des_main_meth.md diff --git a/man/des_main_out.md b/app/man/des_main_out.md similarity index 100% rename from man/des_main_out.md rename to app/man/des_main_out.md diff --git a/man/des_main_rm.md b/app/man/des_main_rm.md similarity index 100% rename from man/des_main_rm.md rename to app/man/des_main_rm.md diff --git a/man/des_sf_metrics.md b/app/man/des_sf_metrics.md similarity index 100% rename from man/des_sf_metrics.md rename to app/man/des_sf_metrics.md diff --git a/man/des_sf_twu.md b/app/man/des_sf_twu.md similarity index 100% rename from man/des_sf_twu.md rename to app/man/des_sf_twu.md diff --git a/readMe.md b/app/readMe.md similarity index 100% rename from readMe.md rename to app/readMe.md diff --git a/server.R b/app/server.R similarity index 100% rename from server.R rename to app/server.R diff --git a/set-up.R b/app/set-up.R similarity index 69% rename from set-up.R rename to app/set-up.R index db7ec10..e4de006 100644 --- a/set-up.R +++ b/app/set-up.R @@ -2,13 +2,13 @@ ## PACKAGES ## ############## -if(!require("shiny")) install.packages("shiny") -if(!require("shinydashboard")) install.packages("shinydashboard") -if(!require("shinycssloaders")) install.packages("shinycssloaders") -if(!require("shinyFiles")) install.packages("shinyFiles") -if(!require("markdown")) install.packages("markdown") -if(!require("DT")) install.packages("DT") -if(!require("tidyverse")) install.packages("tidyverse") +if(!require("shiny")) install.packages("shiny") +if(!require("shinydashboard")) install.packages("shinydashboard") +if(!require("shinycssloaders")) install.packages("shinycssloaders") +if(!require("shinyFiles")) install.packages("shinyFiles") +if(!require("markdown")) install.packages("markdown") +if(!require("DT")) install.packages("DT") +if(!require("tidyverse")) install.packages("tidyverse") if(!require("ggpubr")) install.packages("ggpubr") # draw regression line in ggplot if(!require("scales")) install.packages("scales") # modify datetime format in ggpplot diff --git a/ui.R b/app/ui.R similarity index 100% rename from ui.R rename to app/ui.R diff --git a/www/Nadezhdina_2018_fig1.png b/app/www/Nadezhdina_2018_fig1.png similarity index 100% rename from www/Nadezhdina_2018_fig1.png rename to app/www/Nadezhdina_2018_fig1.png diff --git a/www/hfd_principle.png b/app/www/hfd_principle.png similarity index 100% rename from www/hfd_principle.png rename to app/www/hfd_principle.png diff --git a/www/project-settings.js b/app/www/project-settings.js similarity index 100% rename from www/project-settings.js rename to app/www/project-settings.js diff --git a/www/stemProfile.png b/app/www/stemProfile.png similarity index 100% rename from www/stemProfile.png rename to app/www/stemProfile.png diff --git a/www/styles.css b/app/www/styles.css similarity index 100% rename from www/styles.css rename to app/www/styles.css