Skip to content

Commit

Permalink
👷‍♂️ Update default SQL server port to 1500 (#336)
Browse files Browse the repository at this point in the history
* Update default SQL server port to 1500

* Update port in appsettings.Development.json
  • Loading branch information
danielmackay committed Jun 11, 2024
1 parent a727ab2 commit 0e24f89
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ services:
# If you really want to use MS SQL Server, uncomment the following line
#image: mcr.microsoft.com/mssql/server
ports:
- 1433:1433
restart: always
- 1500:1433
# restart the container unless it's been manually stopped
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yourStrong(!)Password -Q 'SELECT 1' || exit 1"]
interval: 10s
retries: 10
start_period: 10s
timeout: 3s
timeout: 3s
6 changes: 1 addition & 5 deletions src/WebApi/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"Microsoft.AspNetCore": "Warning"
}
},
// NOTE: If any of your connection strings real passwords, you should delete them and put them in the user secrets file instead.
"ConnectionStrings": {
// Local DB
//"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=CleanArchitecture;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=True"
// Docker DB
"DefaultConnection": "Server=localhost,1433;Initial Catalog=CleanArchitecture;Persist Security Info=False;User ID=sa;Password=yourStrong(!)Password;MultipleActiveResultSets=True;TrustServerCertificate=True;Connection Timeout=30;"
"DefaultConnection": "Server=localhost,1500;Initial Catalog=CleanArchitecture;Persist Security Info=False;User ID=sa;Password=yourStrong(!)Password;MultipleActiveResultSets=True;TrustServerCertificate=True;Connection Timeout=30;"
}
}
2 changes: 1 addition & 1 deletion tools/Database/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
}
},
"ConnectionStrings": {
"DefaultConnection": "Server=localhost,1433;Initial Catalog=CleanArchitecture;Persist Security Info=False;User ID=sa;Password=yourStrong(!)Password;MultipleActiveResultSets=True;TrustServerCertificate=True;Connection Timeout=30;"
"DefaultConnection": "Server=localhost,1500;Initial Catalog=CleanArchitecture;Persist Security Info=False;User ID=sa;Password=yourStrong(!)Password;MultipleActiveResultSets=True;TrustServerCertificate=True;Connection Timeout=30;"
}
}

0 comments on commit 0e24f89

Please sign in to comment.