diff --git a/.dockerignore b/.dockerignore index 16f016c..98cd24b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,7 @@ +.git +.gitignore +.github +.Rproj.user +.Rhistory README.md dev_local \ No newline at end of file diff --git a/README.md b/README.md index 12671bc..4e8c7f3 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,38 @@ # Development -## Start a local opencpu server +## Testing with a local OpenCPU server -* run `docker-compose up -d` in the `dev_local` directory of this repository - * run `docker-compose down` to stop the server -* open `http://localhost:80/ocpu/` in your browser to see the opencpu server -* test fearbase package by posting requests in `../library/fearbase/` \ No newline at end of file +You can test how any changes you make to the fearbase R package affect the deployment of the OpenCPU server by running an +OpenCPU server locally. + + +### Start the OpenCPU server: + +In the `dev_local` directory of this repository run: + +```bash +docker compose up -d --build +``` + +### Stop the OpenCPU server + +```php +docker compose down +``` + +### Update the OpenCPU server +After making changes to the fearbase package. Simply run +```php +docker compose up -d --build +``` +again. +If you **don't see any changes** it might be the browser caching an old state of the Docker container. +In that case either delete your browser cache or open the OpenCPU API Explorer in a new **private/icognito session**. + +### Testing on the OpenCPU server + +Open [http://localhost/ocpu/](http://localhost:80/ocpu/) in your browser to access the OpenCPU API Explorer interface. + +In the interface you can run any functions and access included data of the fearbase package by making requests in `../library/fearbase/`. +Check the [OpenCPU API docs](https://www.opencpu.org/api.html#api-methods) for information on how to use the OpenCPU API Explorer \ No newline at end of file