- 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
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.
- 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:
- 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
beforeRUN R -e 'renv::restore()'
- set a working title for your app by
export MY_MOVEAPPS_APP=hello-world
- build the Docker image locally by
docker build -t $MY_MOVEAPPS_APP .
- execute the image with
docker run --rm --name $MY_MOVEAPPS_APP -it -p 3838:3838 $MY_MOVEAPPS_APP
- you will get a
bash
terminal of the running container. There you can get a R console byR
or simply start your app by invoking/home/moveapps/co-pilot-r/start-process.sh
inside the running container.