Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.67 KB

developer_README.md

File metadata and controls

23 lines (16 loc) · 1.67 KB

Developing with the MoveApps SDK

General notes

  • get an overview with the help of the user manual
  • your app codes goes to ./ShinyModule.R
  • setup your app arguments and your environment by adjusting ./co-pilot-sdk.R
  • to run your app code locally execute the file ./co-pilot-sdk.R

R Library management

The template is prepared to use renv as a dependency manager - but is disabled ("opt-in") by default. You can activate renv with renv::activate() and then use it in the usual renv workflow. This will setup your local development environment quickly and in an isolated manner.

Docker support

  • at the end your app will be executed on MoveApps in a Docker container.
  • if you like you can test your app in the almost final environment by running your app locally in a docker container:
  1. add each R library you added to your app via renv to the docker image by adding eg. RUN R -e 'remotes::install_version("foreach")' to the ./Dockerfile before RUN R -e 'renv::restore()'
  2. set a working title for your app by export MY_MOVEAPPS_APP=hello-world
  3. build the Docker image locally by docker build -t $MY_MOVEAPPS_APP .
  4. execute the image with docker run --rm --name $MY_MOVEAPPS_APP -it -p 3838:3838 $MY_MOVEAPPS_APP
  5. you will get a bash terminal of the running container. There you can get a R console by R or simply start your app by invoking /home/moveapps/co-pilot-r/start-process.sh inside the running container.