Internal service for managing free schools projects
- .NET 8.0
- NodeJS (for frontend build tools)
- Docker Desktop
- SQL Server Management Studio or Azure Data Studio
1 - Bring up the dev stack:
-
Navigate to the root of the project
managefreeschoolprojects -
Run the command
docker-compose -f Stack/docker-compose.yml up -d --build.- This will bring up the sql sever with a username and password set. - Create an empty database. - Apply migrations.
2 - Open the project in Visual studio 🚀
3 - Run npm install; npm run build from the Dfe.ManageFreeSchoolProjects/wwwroot directory to build the styles.
- In command line navigate to Dfe.ManageFreeSchoolProjects.Data
- Issue the command
dotnet ef migrations add <MigrationName> - After making changes to run the migration run the command
dotnet ef database update --context MfspContext --connection "<db connection string>"
- Run
npm install; npm run buildfrom theDfe.ManageFreeSchoolProjects/wwwrootdirectory to build the styles. - Run
dotnet restorefrom theDfe.ManageFreeSchoolProjectsproject to restore dependencies. - Run
dotnet runfrom theDfe.ManageFreeSchoolProjectsproject to run the application.
In a terminal:
- Run
docker pull mcr.microsoft.com/azure-sql-edge:latest\to pull the latest version of Azure SQL Edge. - Run
docker run --cap-add SYS_PTRACE -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=INSERT_CHOSEN_PASSWORD" -p 1433:1433 --name azuresqledgeMFSP -d mcr.microsoft.com/azure-sql-edgeand replace the password with one of your choice.
- Connect to
127.0.0.1,1433and log into themasterdatabase as a Server Administrator with the password you chose. - Create a login for the app:
CREATE LOGIN [mfsp] WITH PASSWORD = 'EnterAStrongPasswordHere&'; - Log into the specific database used by this app, and create the schema, user and permissions:
CREATE USER [mfsp] FOR LOGIN [mfsp] WITH DEFAULT_SCHEMA = [dbo];
GRANT CREATE TABLE TO [mfsp];
CREATE SCHEMA [mfsp];
GRANT CONTROL ON SCHEMA::[dbo] TO [mfsp];
GRANT CONTROL ON SCHEMA::[mfsp] TO [mfsp];Include the following extension in your IDE installation: SonarQube for IDE
Update your settings.json file to include the following
"sonarlint.connectedMode.connections.sonarcloud": [
{
"connectionId": "DfE",
"organizationKey": "dfe-digital",
"disableNotifications": false
}
]Then follow these steps to connect to the SonarCloud instance.