Planscape's Forsys Server
Planscape is a new wildfire resilience planning web application built by * Spatial Informatics Group (SIG)* for the U.S. Forest Service and partners. Planscape brings the best available state and federal data together so regional planners can prioritize landscape treatments that reduce wildfire risk, maximize ecological benefits, and help communities adapt to climate change.
Forsys Server is a Web Service, part of Planscape architecture, that transform the user's inputs to execute ForSys, and transform the results back to Planscape format in order to be displayed on Plascape website.
- Docker & Docker Compose — local development & runtime
- ForSys — optimization package for land-management planning
- Plumber - API Generator for R
- PostGIS — database (with PostgreSQL) for storing geometry, plans and results
Currently, this project is being deployed on GCP Cloud Run.
It is necessary to build the Docker image, push it on GCP and then, deploy it. The following command must be used to deploy.
$ make build-deploy ENV=<environment>There's two options to run this project locally.
- With Docker
- Rscript
Using docker compose to provision the service.
$ docker compose upIt is possible to install all R dependecies directly to your machine and execute R to start Plumber server. The run_forsys_server.sh file
triggers its execution.
Be aware that it requires editing the .env file with the database credentials and paths that files will be output.
$ Rscript install.R # install dependecies
$ cp .sample.env .env # require editing
$ bash run_forsys_server.sh