From de31676febc75b03c42cd26dfadb95b1a6c44361 Mon Sep 17 00:00:00 2001 From: elinork <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 08:45:37 -0400 Subject: [PATCH 1/7] Update devcontainer.json Trying to automatically run Shiny app on codespace start --- .devcontainer/devcontainer.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4b5a39d0e..0199099a5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "R Studio Server", + "name": "R Studio Server", "image": "ghcr.io/rocker-org/devcontainer/geospatial:4", "features": { "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { @@ -15,9 +15,15 @@ "label": "R Studio Server", "requireLocalPort": true, "onAutoForward": "ignore" + }, + "37376":{ + "label": "Shiny app", + "requireLocalPort": true, + "onAutoForward": "ignore" } }, "postAttachCommand": { - "rstudio-start": "sudo rstudio-server start" + "rstudio-start": "sudo rstudio-server start", + "run-shiny-app": "R -e shiny::runApp(appDir = ${localWorkspaceFolder}, port = '37376')" } } From 21675a259a733c2e263984214b348f7277d9f2e1 Mon Sep 17 00:00:00 2001 From: elinork <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 08:56:27 -0400 Subject: [PATCH 2/7] Update devcontainer.json --- .devcontainer/devcontainer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0199099a5..67a34b682 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,10 +2,10 @@ "name": "R Studio Server", "image": "ghcr.io/rocker-org/devcontainer/geospatial:4", "features": { - "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { + "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { "packages": "github::USEPA/TADA,config,golem,readxl,writexl,leaflet,shiny,shinyWidgets,shinyjs,shinycssloaders,DT,ggplot2,shinybusy,dplyr,plyr,tidyr,scales,forcats,RColorBrewer,lubridate,plotly", "installSystemRequirements": true - } + } }, "forwardPorts": [ 8787 @@ -13,17 +13,17 @@ "portsAttributes": { "8787":{ "label": "R Studio Server", - "requireLocalPort": true, - "onAutoForward": "ignore" + "requireLocalPort": true, + "onAutoForward": "ignore" }, "37376":{ "label": "Shiny app", - "requireLocalPort": true, - "onAutoForward": "ignore" + "requireLocalPort": true, + "onAutoForward": "ignore" } }, "postAttachCommand": { "rstudio-start": "sudo rstudio-server start", - "run-shiny-app": "R -e shiny::runApp(appDir = ${localWorkspaceFolder}, port = '37376')" + "run-shiny-app": "R -e shiny::runApp(port = 37376)" } } From 702f36a8cf1173b1009a3d1de8dc2206516ccbf4 Mon Sep 17 00:00:00 2001 From: elinork <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:07:00 -0400 Subject: [PATCH 3/7] Update devcontainer.json --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 67a34b682..fc63c3cd6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,6 +24,6 @@ }, "postAttachCommand": { "rstudio-start": "sudo rstudio-server start", - "run-shiny-app": "R -e shiny::runApp(port = 37376)" + "run-shiny-app": "R -e 'shiny::runApp(port = 37376)'" } -} +}' From a83a0c1f7b09597dc0dfd6f75284671a68d641b9 Mon Sep 17 00:00:00 2001 From: elinork <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:09:02 -0400 Subject: [PATCH 4/7] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fc63c3cd6..ca6aa7ec0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,4 +26,4 @@ "rstudio-start": "sudo rstudio-server start", "run-shiny-app": "R -e 'shiny::runApp(port = 37376)'" } -}' +} From cd2b5eba8f3840fc4db3614ba10879174bc6b1e1 Mon Sep 17 00:00:00 2001 From: ElinorK <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:20:44 -0400 Subject: [PATCH 5/7] Don't require local port --- .devcontainer/devcontainer.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ca6aa7ec0..f33e65d2d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,29 +1,29 @@ { "name": "R Studio Server", "image": "ghcr.io/rocker-org/devcontainer/geospatial:4", - "features": { - "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { + "features": { + "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { "packages": "github::USEPA/TADA,config,golem,readxl,writexl,leaflet,shiny,shinyWidgets,shinyjs,shinycssloaders,DT,ggplot2,shinybusy,dplyr,plyr,tidyr,scales,forcats,RColorBrewer,lubridate,plotly", "installSystemRequirements": true - } - }, + } + }, "forwardPorts": [ 8787 ], "portsAttributes": { - "8787":{ + "8787": { "label": "R Studio Server", - "requireLocalPort": true, - "onAutoForward": "ignore" + "requireLocalPort": true, + "onAutoForward": "ignore" }, - "37376":{ + "37376": { "label": "Shiny app", - "requireLocalPort": true, - "onAutoForward": "ignore" + "requireLocalPort": false, + "onAutoForward": "ignore" } }, "postAttachCommand": { "rstudio-start": "sudo rstudio-server start", - "run-shiny-app": "R -e 'shiny::runApp(port = 37376)'" + "run-shiny-app": "R -e 'shiny::runApp(port = 37376)'" } -} +} \ No newline at end of file From 08f39034da13522c1d6315d9aa5d4d0b04c619b7 Mon Sep 17 00:00:00 2001 From: elinork <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:36:00 -0400 Subject: [PATCH 6/7] Update devcontainer.json Add forwardPort --- .devcontainer/devcontainer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f33e65d2d..479477917 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,8 @@ } }, "forwardPorts": [ - 8787 + 8787, + 37376 ], "portsAttributes": { "8787": { @@ -26,4 +27,4 @@ "rstudio-start": "sudo rstudio-server start", "run-shiny-app": "R -e 'shiny::runApp(port = 37376)'" } -} \ No newline at end of file +} From 2295d4f0ca91304fa2d39f601e0d82185bbcb7bc Mon Sep 17 00:00:00 2001 From: elinork <16242091+elinork@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:42:20 -0400 Subject: [PATCH 7/7] Update devcontainer.json --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 479477917..75fa0b760 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "R Studio Server", + "name": "R Studio Server and Shiny app", "image": "ghcr.io/rocker-org/devcontainer/geospatial:4", "features": { "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { @@ -19,7 +19,7 @@ }, "37376": { "label": "Shiny app", - "requireLocalPort": false, + "requireLocalPort": true, "onAutoForward": "ignore" } },