Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
user: rstudio
workbench_tools: true
postgres_client: true
r-analysis-aou:
user: rstudio
workbench_tools: true
postgres_client: true
filters:
- 'src/aou-common/**'
vscode:
user: abc
workbench_tools: true
Expand Down Expand Up @@ -143,7 +149,7 @@ jobs:
needs: [detect-changes]
runs-on: ubuntu-latest
continue-on-error: true
if : ${{ needs.detect-changes.outputs.templates != '[]' }}
if : ${{ needs.detect-changes.outputs.apps != '[]' }}
Comment thread
yuhuyoyo marked this conversation as resolved.
strategy:
matrix:
app: ${{ fromJSON(needs.detect-changes.outputs.apps) }}
Expand Down
42 changes: 42 additions & 0 deletions src/r-analysis-aou/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "R Analysis Environment for AoU",
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"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"
}
17 changes: 17 additions & 0 deletions src/r-analysis-aou/Dockerfile
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
Comment thread
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
17 changes: 17 additions & 0 deletions src/r-analysis-aou/README.md
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`._
23 changes: 23 additions & 0 deletions src/r-analysis-aou/devcontainer-template.json
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"]
}
39 changes: 39 additions & 0 deletions src/r-analysis-aou/docker-compose.yaml
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:
Loading
Loading