-
Notifications
You must be signed in to change notification settings - Fork 1
Development Environment
Sandro Ferreira edited this page Feb 1, 2020
·
1 revision
By: Sandro Ferreira - Feb. 02, 2020
- Visual Studio
- Docker desktop
- Database Client (Recommended: DataGrip)
Install ASP.NET and web development workload.
docker create -v /var/lib/postgresql/data --name postgres-data busybox
docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=password -d --volumes-from postgres-data postgres
Create the database schema using the Database.sql file available on the resources folder.
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/postgres
The 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"
}
}
}
Copyright © 2018-2020 | e-Referee