Skip to content

Commit

Permalink
Merge pull request #4 from Sage-Bionetworks/ecs_setting
Browse files Browse the repository at this point in the history
perf(*): containerized dccmonitor_ECS
  • Loading branch information
danlu1 committed Apr 5, 2023
2 parents f764173 + 9bc06ac commit bef7bff
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/Release_Docker_build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

name: Create and publish a Docker image
name: Create Github release and generate Docker image

on:
push:
Expand Down Expand Up @@ -33,6 +33,7 @@ jobs:
body: ${{ steps.tag_version.outputs.changelog }}

build-and-push-image:
needs: tagging
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -55,6 +56,7 @@ jobs:
uses: docker/[email protected]
with:
images: ${{ env.IMAGE_PATH }}
tags: ${{ needs.tagging.outputs.tag}}

- name: Build and push Docker image
uses: docker/[email protected]
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ COPY --chown=shiny ./ ./
RUN Rscript -e "install.packages('reticulate', repos='http://cran.rstudio.com/', verbose=FALSE)"
RUN Rscript -e "library(reticulate); install_miniconda(); py_discover_config(); py_install(c('synapseclient', 'pandas'), pip = TRUE, pip_ignore_installed=TRUE)"

# alternative to using renv
#RUN Rscript -e "install.packages(c('shinydashboard','tidyverse','readxl','gt','gtsummary','survival','survminer','rsconnect','janitor','rjson'), repos='http://cran.rstudio.com/', verbose=FALSE)"

# By default the log level is TRACE. We bump up one level to DEBUG to make the logs a bit less verbose
ENV SHINY_LOG_LEVEL=DEBUG

Expand Down
14 changes: 3 additions & 11 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,16 @@ app_url <- NULL
claims_param <- NULL
authorization_url <- NULL

if (interactive()) {
# testing url
options(shiny.port = 8100)
app_url <- "http://127.0.0.1:8100"
} else {
app_url <- Sys.getenv("APP_REDIRECT_URL")
}

.onLoad <- function(libname, pkgname) { # nolint
synapse <<- reticulate::import("synapseclient", delay_load = TRUE)
if (!interactive()) {
#if (!interactive()) {
setup_global_oauth_vars(
app_url = Sys.getenv("app_url"),
app_url = Sys.getenv("APP_REDIRECT_URL"),
client_name = Sys.getenv("client_name"),
client_id = Sys.getenv("client_id"),
client_secret = Sys.getenv("client_secret")
)
}
#}
}

#' @title Synapse Oauth Module
Expand Down
1 change: 0 additions & 1 deletion app.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Launch the ShinyApp (Do not remove this comment)
# To deploy, run: rsconnect::deployApp()
# Or use the blue button on top of this file

Sys.setenv(R_CONFIG_ACTIVE = Sys.getenv("R_CONFIG_ACTIVE"), # Replace "default" with your config
R_CONFIG_FILE = "inst/config.yml")
pkgload::load_all()
Expand Down
5 changes: 4 additions & 1 deletion dccmonitor_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Pass environment variable to Shiny
echo "" >> .Renviron
echo APP_REDIRECT_URL=$APP_REDIRECT_URL >> .Renviron

echo R_CONFIG_ACTIVE=$R_CONFIG_ACTIVE >> .Renviron
echo client_id=$client_id >> .Renviron
echo client_name=$client_name >> .Renviron
echo client_secret=$client_secret >> .Renviron
# Now run the base start-up script
./startup.sh
2 changes: 0 additions & 2 deletions inst/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ amp-ad:
- "specimenID"

pec:
#app_url: "https://shinypro.synapse.org/users/danlu/dccmonitor-pec/"
samples_table: "syn22175287"
annotations_table: "syn20981788"
annotations_storage: "syn21763155"
Expand Down Expand Up @@ -176,7 +175,6 @@ pec:
- "runType"

1kD:
#app_url: "https://shinypro.synapse.org/users/danlu/dccmonitor_1kD/"
samples_table: "syn27817789"
annotations_table: "syn27806892"
annotations_storage: "syn27605404"
Expand Down

0 comments on commit bef7bff

Please sign in to comment.