- 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 insrc/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
host start --port 5001
- Run the Function App
- Setup React App
- install NPM packages.
- From the DashboardUI directory:
npm install
- From the DashboardUI directory:
- Requires Node version 16+
- Requires NPM version 8+
- For Windows download the Node installer here: https://nodejs.org/en/download/
- this installer includes NPM update
- For Windows download the Node installer here: https://nodejs.org/en/download/
- Start React App
- From the DashboardUI directory:
npm run start
- From the DashboardUI directory:
- install NPM packages.
- CORS configuration is set in the
local.settings.json
file of the function app
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
- Setting secrets for deployment: https://github.com/Azure/actions-workflow-samples/blob/master/assets/create-secrets-for-GitHub-workflows.md
- To set secret with Azure Credientials, there should already be app registrations for the github actions, so just need to renew secret and put the new secret in the json (need at least Application Administrator role)