Skip to content

Commit

Permalink
Merge pull request #7 from Sage-Bionetworks/dockerization
Browse files Browse the repository at this point in the history
perf: update dockerization instructions
  • Loading branch information
danlu1 authored Apr 10, 2023
2 parents 47568aa + a1307b3 commit dd4c0d0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ 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_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=<APP_REDIRECT_URL> -e R_CONFIG_ACTIVE=1kD -e client_id=<Oauth client id> -e client_name=<Oauth client name> -e client_secret=<Oauth client secret> --name <container name> <dccvalidator_1kd or pull ghcr.io/sage-bionetworks/dccvalidator_1kd:v1.0.0>
```
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
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<APP_REDIRECT_URL> -e R_CONFIG_ACTIVE=1kD -e client_id=<Oauth client id> -e client_name=<Oauth client name> -e client_secret=<Oauth client secret> --name <container name> dccvalidator_1kd
docker run --rm -it -p 8100:3838 -e APP_REDIRECT_URL=<APP_REDIRECT_URL> -e R_CONFIG_ACTIVE=1kD -e client_id=<Oauth client id> -e client_name=<Oauth client name> -e client_secret=<Oauth client secret> --name <container name> <dccvalidator_1kd or pull ghcr.io/sage-bionetworks/dccvalidator_1kd:v1.0.0>
```
Once the container is created, you can head to the APP_REDIRECT_URL you specified to enter the app.

Expand Down

0 comments on commit dd4c0d0

Please sign in to comment.