Database and API for the CAM
- Copy .env-example to .env and change values as needed
- Copy db-server/.env-example to db-server/.env and change values as needed
- Install dependencies
This assumes you have NodeJS v12 or higher and Yarn installed
yarn install
- Using Docker and Docker Compose to start the database:
docker volume create cam-db-data
docker-compose up -d db
Note: wait a minute or two for the database to initialize
- Run the db migrations with
./run-knex.sh migrate:latest
- populate the initial H3 level 4 and 5 tables
node data/loadgrids.js
-
Load the data using instructions below
-
Start the app
yarn run dev
docker-compose down
docker volume rm cam-db-data
on macOS install Homebrew then brew install gdal
or using the Docker image https://hub.docker.com/r/osgeo/gdal and attaching the data folder as a volume
Use data/create_monthly_data.sh
to create monthly GeoJSON files from the EWS data update
use node data/loadgrids.js
to populate the initial H3 level 4 and 5 tables
Use node data/load_ews_month.js
or the load-data.sh
script in development, to load monthly updates in the database, update the script to set the months to load