WaDE
Getting Started
- Clone this repo.
- Make sure you have the .NET 6 SDK installed.
- Start SQL Server (Docker or Host machine)
- If you already have a SQL Server container running, just use that as the Host machine no need for docker.
- To spin up a new SQL server docker container:
docker-compose
file supplied in src/API/BackendServices/WesternStatesWater.WaDE.Docker/docker-compose.dev.yml
docker-compose up -d
- Run DbUp project from WaDE2 repo
- Note: No need to run DbUp if you imported bacpac files for the DBs
- Need two databases WaDE2 and WaDE2Test
- WaDE2Test is for the unit tests
- If not using the default SQL server, update the connection string in launchSettings.json in the DbUp project
- May need to run this twice if using docker
- Setup Function App
- Open Solution: path to file WestDAAT\src\API\WesternStatesWater.WestDaat.sln
- Right-click on Client.Functions project and choose Set as Startup Project
- create
local.settings.json
file in the Client.Functions project
- If necessary, create personal.settings.json to override any developer specific settings. As an example( e.g. Insert: {“Database”:{“ConnectionString”: “Server = ‘Insert server name here’ ; Initial Catalog = ‘Insert local db name here’ ; Integrated Security = true;”}}) However this may vary.
- Set the listening port to 5001
- Right-click on Client.Functions project
- Choose Properties
- Select Debug -> General -> Open debug launch profiles UI
- In the command line arguments enter the following
- Run the Function App
- Setup React App
- install NPM packages.
- From the DashboardUI directory:
npm install
- Requires Node version 16+
- Requires NPM version 8+
- Start React App
- From the DashboardUI directory:
npm run start
CORS errors
- CORS configuration is set in the
local.settings.json
file of the function app
Update Mapbox Vector Tileset
Only do this if you need to update the vector tiles in maptiler
- Run MapboxTilesetCreate console app located in /tools
- Optional - Add personal.settings.json for connection string settings
- Allocations.Points.geojson and Allocations.Polygons.geojson files will be generated in geojson dir
- Run
tippecanoe -zg -o waterRights.mbtiles --read-parallel --drop-densest-as-needed --extend-zooms-if-still-dropping --generate-ids --force -L points:"Allocations.Points.geojson" -L polygons:"Allocations.Polygons.geojson"
This will take about 5 minutes
- Upload to mapbox studio
Deployment