This repo holds the Docker container that provides the OHDSI Shiny Results Viewer for the GLP-1 receptor agonists and subsequent risk of acute liver injury.
The results viewer for this study is found here: https://results.ohdsi.org/app/24_Glp1Dili
This repository and the Docker container are designed to work with the OHDSI Shiny proxy. More details on how this works are described in this repo. When the container for this repository is built, it is automatically uploaded to Docker Hub here. From there the ShinyProxyDeploy repository is updated to note the new container in the application.yml.
This README assumes you are familiar with Docker concepts. An overview of Docker can be found here. Additionally, it assumes you have a PostgreSQL Database with a schema that contains results generated from the GLP-1 receptor agonists and subsequent risk of acute liver injury.
Since this container is designed to work with the OHDSI Shiny Proxy Deploy, it will require some modficiations if you'd like to use it on your machine. Here are the steps if you'd like to try it out:
- Clone this repository
- Add a file called
.env
to the root of the project to hold sensitive information. Specifically, you'll want to add your GitHub Personal Access Token to the.env
file so it looks like this:
build_github_pat="ghp_<secret>"
- Edit
app.R
to include the details to connect to your database. Specifically this section:
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 = connectionDetails,
resultDatabaseSettings = createDefaultResultDatabaseSettings(schema = "apac_glp1ra"),
title = "Semaglutide NAION"
)
In the code above, you'll want to replace the DatabaseConnector::createConnectionDetails
with the details to connect to your PostgreSQL database with the study results. Additionally, you'll want to change the schema
parameter in: resultDatabaseSettings = createDefaultResultDatabaseSettings(schema = "apac_glp1ra")
to match the schema where you have the study results.
- Once the changes above are complete, you can build the container by running:
docker-compose build
- Once the docker container is built, you can run it:
docker-compose up
The application will be available on http://localhost:3838