-
Notifications
You must be signed in to change notification settings - Fork 34
AoU Compliant RStudio App #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b288210
Create r-analysis-aou
pantherman594 218fcf6
Policy warnings
pantherman594 f683e3e
Include aou common
pantherman594 1e985bb
Formatting, make download intercept more reliable
pantherman594 523e597
WIP
pantherman594 0257e17
Rewrite redirects
pantherman594 851bfae
Add rstudio AoU to CI test
pantherman594 3b12a72
Without nginx
pantherman594 39efc9b
Update .devcontainer.json for including aou common
pantherman594 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "name": "R Analysis Environment for AoU", | ||
| "dockerComposeFile": ["docker-compose.yaml", "../aou-common/aou-common-compose.yaml"], | ||
| "service": "app", | ||
| "runServices": ["app", "wondershaper"], | ||
| "shutdownAction": "none", | ||
| "workspaceFolder": "/workspace", | ||
| "postCreateCommand": [ | ||
| "./startupscript/post-startup.sh", | ||
| "rstudio", | ||
| "/home/rstudio", | ||
| "${templateOption:cloud}", | ||
| "${templateOption:login}" | ||
| ], | ||
| // re-mount bucket files on container start up | ||
| "postStartCommand": [ | ||
| "./startupscript/remount-on-restart.sh", | ||
| "rstudio", | ||
| "/home/rstudio", | ||
| "${templateOption:cloud}", | ||
| "${templateOption:login}" | ||
| ], | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/java@sha256:df67d6ff6e9cdd858207ae9e92a99ddb88384b789f79eecd6f873216e951d286": { | ||
| "version": "17" | ||
| }, | ||
| "ghcr.io/rocker-org/devcontainer-features/r-packages@sha256:1a4ec64c4d2060e78e9c812bd3b3622c7e008465d566a2781c0e2b17a82592e5": { | ||
| "packages": "shiny,shinydashboard", | ||
| "installSystemRequirements": true | ||
| }, | ||
| "ghcr.io/devcontainers/features/aws-cli@sha256:bbc9fd513c22e331953126c75ad7b2ed1f9044f1cd5890b7073b634810459b18": {}, | ||
| "ghcr.io/dhoeric/features/google-cloud-cli@sha256:fa5d894718825c5ad8009ac8f2c9f0cea3d1661eb108a9d465cba9f3fc48965f": {}, | ||
| "./.devcontainer/features/workbench-tools": { | ||
| "cloud": "${templateOption:cloud}", | ||
| "username": "rstudio", | ||
| "userHomeDir": "/home/rstudio" | ||
| }, | ||
| "./.devcontainer/features/postgres-client": { | ||
| "version": "16" | ||
| } | ||
| }, | ||
| "remoteUser": "root" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.5 | ||
|
|
||
| ARG USER=rstudio | ||
| ARG HOME=/home/$USER | ||
|
|
||
| COPY static /usr/lib/rstudio-server/www/aou-static | ||
| RUN sed -i 's|</head>|<script src="/aou-static/aou-policy-interceptor.js"></script><link rel="stylesheet" href="/aou-static/aou-policy-styles.css"></head>|' /usr/lib/rstudio-server/www/index.htm | ||
|
yuhuyoyo marked this conversation as resolved.
|
||
|
|
||
| # Remove sudo access | ||
| RUN rm /etc/sudoers.d/${USER} | ||
|
|
||
| COPY --from=load-envs --chown=$USER \ | ||
| /dist/load-env /dist/load-env.sh $HOME | ||
|
|
||
| RUN echo "source $HOME/load-env.sh" >> $HOME/.bashrc | ||
|
|
||
| # TODO(PHP-87353): Add remotefuse back. See https://github.com/verily-src/workbench-app-devcontainers/pull/227 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
|
|
||
| # R Analysis Environment for AoU (r-analysis-aou) | ||
|
|
||
| A Template to run R Analysis Environment on Workbench for AoU | ||
|
|
||
| ## Options | ||
|
|
||
| | Options Id | Description | Type | Default Value | | ||
| |-----|-----|-----|-----| | ||
| | cloud | VM cloud environment | string | gcp | | ||
| | login | Whether to log in to workbench CLI | string | false | | ||
|
|
||
|
|
||
|
|
||
| --- | ||
|
|
||
| _Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/verily-src/workbench-app-devcontainers/blob/main/src/r-analysis/devcontainer-template.json). Add additional notes to a `NOTES.md`._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "id": "r-analysis-aou", | ||
| "version": "0.0.2", | ||
| "name": "R Analysis Environment for AoU", | ||
| "description": "A Template to run the R Analysis Environment on workbench for AoU", | ||
| "documentationURL": "https://github.com/verily-src/workbench-app-devcontainers/tree/master/src/r-analysis-aou", | ||
| "licenseURL": "https://github.com/verily-src/workbench-app-devcontainers/blob/master/LICENSE", | ||
| "options": { | ||
| "cloud": { | ||
| "type": "string", | ||
| "description": "VM cloud environment", | ||
| "proposals": ["gcp", "aws"], | ||
| "default": "gcp" | ||
| }, | ||
| "login": { | ||
| "type": "string", | ||
| "description": "Whether to log in to workbench CLI", | ||
| "proposals": ["true", "false"], | ||
| "default": "false" | ||
| } | ||
| }, | ||
| "platforms": ["Any"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| include: | ||
| - ../aou-common/aou-common-compose.yaml | ||
| services: | ||
| app: | ||
| container_name: "application-server" | ||
| build: | ||
| context: . | ||
| additional_contexts: | ||
| load-envs: service:aou-common-load-envs | ||
| restart: always | ||
| ports: | ||
| - "8787:8787" | ||
| volumes: | ||
| - .:/workspace:cached | ||
| - work:/home/rstudio:cached | ||
| tmpfs: | ||
| - /home/rstudio/workspace:uid=1000,gid=1000 | ||
| environment: | ||
| "DISABLE_AUTH": "true" | ||
| networks: | ||
| - app-network | ||
| cap_add: | ||
| - SYS_ADMIN | ||
| devices: | ||
| - /dev/fuse | ||
| security_opt: | ||
| - apparmor:unconfined | ||
| wondershaper: | ||
| container_name: "wondershaper" | ||
| image: "us-west2-docker.pkg.dev/shared-pub-buckets-94mvrf/workbench-artifacts/app-wondershaper@sha256:1aee5cd4032d4888f382e3b11c0b775479ccaf55d97943f64049f90cfba05fac" | ||
| restart: always | ||
| network_mode: "host" | ||
| cap_add: | ||
| - NET_ADMIN | ||
| networks: | ||
| app-network: | ||
| external: true | ||
| volumes: | ||
| work: |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.