-
Notifications
You must be signed in to change notification settings - Fork 0
Setup 1. Dev Environment
Sandro Ferreira edited this page Nov 29, 2021
·
4 revisions
By: Sandro Ferreira - Mar. 26, 2020
- Visual Studio
- Docker desktop
- Database Client (Recommended: HeidiSQL)
Install ASP.NET and web development workload.
In order to match the Heroku connection string, it must be created like this:
<!--Template:-->
postgres://<user>:<password>@<host>:<port>/<database>
<!--Example:-->
postgres://postgres:password@localhost:5432/postgresThe environment variables are setted on the launchSettings.json property file. Example:
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DATABASE_URL": "postgres://postgres:password@localhost:5432/postgres"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true,
"useSSL": false,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DATABASE_URL": "postgres://postgres:password@<psql_container_ip>:5432/postgres"
}
}
}docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgresCreate the database schema using the Database.sql file available on the resources folder.
docker pull sonarqube
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
Start the container:
docker start sonarqubeAccess Sonar Qube with the following URL: http://localhost:9000
| Login details: | |
|---|---|
| Username: | admin |
| Password: | admin |
dotnet tool install --global dotnet-sonarscannerdotnet sonarscanner begin /k:"<app-name>" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="<app-key>"
dotnet build
dotnet sonarscanner end /d:sonar.login="<app-key>"Copyright © 2018-2022 | eScout