Skip to content

Commit

Permalink
temporarily move back to main directoy
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Nov 29, 2024
1 parent 4800704 commit b0d5bbb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
id: build_and_push
uses: docker/build-push-action@v2
with:
context: ./shinyProxy
context: ./
file: ./Dockerfile
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
Expand Down
File renamed without changes.
30 changes: 16 additions & 14 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@
library(ShinyAppBuilder)
library(OhdsiShinyModules)

# Settings ---------------------------------------------------------------------
resultsConnectionDetails <- DatabaseConnector::createConnectionDetails(
dbms = "sqlite",
server = "E:/exampleStrategusStudy/Results.sqlite"
)
resultsDatabaseSchema <- "main"


# Don't make changes below this line -------------------------------------------
shinyConfig <- initializeModuleConfig() |>
addModuleConfig(
createDefaultAboutConfig()
Expand All @@ -46,10 +37,21 @@ shinyConfig <- initializeModuleConfig() |>
createDefaultEstimationConfig()
)

# now create the shiny app based on the config file and view the results
# based on the connection
cli::cli_h1("Starting shiny server")
serverStr <- paste0(Sys.getenv("shinydbServer"), "/", Sys.getenv("shinydbDatabase"))
cli::cli_alert_info("Connecting to {serverStr}")
connectionDetails <- DatabaseConnector::createConnectionDetails(
dbms = "postgresql",
server = serverStr,
port = Sys.getenv("shinydbPort"),
user = "shinyproxy",
password = Sys.getenv("shinydbPw")
)

cli::cli_h2("Loading schema")
ShinyAppBuilder::createShinyApp(
config = shinyConfig,
connectionDetails = resultsConnectionDetails,
resultDatabaseSettings = createDefaultResultDatabaseSettings(schema = resultsDatabaseSchema)
config = shinyConfig,
connectionDetails = connectionDetails,
resultDatabaseSettings = createDefaultResultDatabaseSettings(schema = "strategus_tutorial"),
title = "Population-level Estimation Tutorial with Strategus"
)
30 changes: 14 additions & 16 deletions shinyProxy/app.R → appLocal.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
library(ShinyAppBuilder)
library(OhdsiShinyModules)

# Settings ---------------------------------------------------------------------
resultsConnectionDetails <- DatabaseConnector::createConnectionDetails(
dbms = "sqlite",
server = "E:/exampleStrategusStudy/Results.sqlite"
)
resultsDatabaseSchema <- "main"


# Don't make changes below this line -------------------------------------------
shinyConfig <- initializeModuleConfig() |>
addModuleConfig(
createDefaultAboutConfig()
Expand All @@ -37,21 +46,10 @@ shinyConfig <- initializeModuleConfig() |>
createDefaultEstimationConfig()
)

cli::cli_h1("Starting shiny server")
serverStr <- paste0(Sys.getenv("shinydbServer"), "/", Sys.getenv("shinydbDatabase"))
cli::cli_alert_info("Connecting to {serverStr}")
connectionDetails <- DatabaseConnector::createConnectionDetails(
dbms = "postgresql",
server = serverStr,
port = Sys.getenv("shinydbPort"),
user = "shinyproxy",
password = Sys.getenv("shinydbPw")
)

cli::cli_h2("Loading schema")
# now create the shiny app based on the config file and view the results
# based on the connection
ShinyAppBuilder::createShinyApp(
config = shinyConfig,
connectionDetails = connectionDetails,
resultDatabaseSettings = createDefaultResultDatabaseSettings(schema = "strategus_tutorial"),
title = "Population-level Estimation Tutorial with Strategus"
config = shinyConfig,
connectionDetails = resultsConnectionDetails,
resultDatabaseSettings = createDefaultResultDatabaseSettings(schema = resultsDatabaseSchema)
)
File renamed without changes.

0 comments on commit b0d5bbb

Please sign in to comment.