From de557d50c001f347a86bfc0364e45340d5c818c1 Mon Sep 17 00:00:00 2001 From: Dan Lu Date: Mon, 10 Apr 2023 12:57:50 -0700 Subject: [PATCH 1/2] perf: update dockerization instructions --- README.Rmd | 15 +++++++++++++++ README.md | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index c55034c..4a6f321 100644 --- a/README.Rmd +++ b/README.Rmd @@ -49,6 +49,21 @@ installation you choose should have synapseclient installed. Because dccvalidator uses reticulate, it is not compatible with the [synapser](https://r-docs.synapse.org/) package. +## Dockerize the App +### Authentication +The dccmonitor can be authorized to log in to Synapse using Synapse Authentication (OAuth) client. Please view instructions [here](https://help.synapse.org/docs/Using-Synapse-as-an-OAuth-Server.2048327904.html#UsingSynapseasanOAuthServer-RegisteringandLinkinganOAuth2.0Client) to learn how to request a client. Our OAuth clients were created using Synapse service accounts in order to enable multiple Sage employees to maintain the applications. In the Shared-SysBio LastPass folder, credentials for each client are recorded. In the notes section of the credentials (click on the entry > Edit to see notes), the service account used to create the client is noted. + +### Build a docker image using Dockerfile +``` +docker build -t dccvalidator_pec -f Dockerfile . +``` + +### Create a container from the docker image +``` +docker run --rm -it -p 8100:3838 -e APP_REDIRECT_URL= -e R_CONFIG_ACTIVE=pec -e client_id= -e client_name= -e client_secret= --name dccvalidator_pec +``` +Once the container is created, you can head to the APP_REDIRECT_URL you specified to enter the app. + ## Check data dccvalidator provides functions for checking the following common data quality diff --git a/README.md b/README.md index 29fe0e2..a6b9a1e 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,14 @@ The dccmonitor can be authorized to log in to Synapse using Synapse Authenticati ``` docker build -t dccvalidator_1kd -f Dockerfile . ``` +### Pull docker image from GitHub Container Registry +``` +docker pull ghcr.io/sage-bionetworks/dccvalidator_1kd:v1.0.0 +``` ### Create a container from the docker image ``` -docker run --rm -it -p 8100:3838 -e APP_REDIRECT_URL= -e R_CONFIG_ACTIVE=1kD -e client_id= -e client_name= -e client_secret= --name dccvalidator_1kd +docker run --rm -it -p 8100:3838 -e APP_REDIRECT_URL= -e R_CONFIG_ACTIVE=1kD -e client_id= -e client_name= -e client_secret= --name ``` Once the container is created, you can head to the APP_REDIRECT_URL you specified to enter the app. From a1307b33da8ebca42ab147cc820586678929bfb9 Mon Sep 17 00:00:00 2001 From: Dan Lu <90745557+danlu1@users.noreply.github.com> Date: Mon, 10 Apr 2023 13:02:37 -0700 Subject: [PATCH 2/2] Update README.Rmd --- README.Rmd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.Rmd b/README.Rmd index 4a6f321..3ae1235 100644 --- a/README.Rmd +++ b/README.Rmd @@ -55,12 +55,16 @@ The dccmonitor can be authorized to log in to Synapse using Synapse Authenticati ### Build a docker image using Dockerfile ``` -docker build -t dccvalidator_pec -f Dockerfile . +docker build -t dccvalidator_1kd -f Dockerfile . +``` +### Pull docker image from GitHub Container Registry +``` +docker pull ghcr.io/sage-bionetworks/dccvalidator_1kd:v1.0.0 ``` ### Create a container from the docker image ``` -docker run --rm -it -p 8100:3838 -e APP_REDIRECT_URL= -e R_CONFIG_ACTIVE=pec -e client_id= -e client_name= -e client_secret= --name dccvalidator_pec +docker run --rm -it -p 8100:3838 -e APP_REDIRECT_URL= -e R_CONFIG_ACTIVE=1kD -e client_id= -e client_name= -e client_secret= --name ``` Once the container is created, you can head to the APP_REDIRECT_URL you specified to enter the app.