-
Notifications
You must be signed in to change notification settings - Fork 244
/
Copy pathrun-server.ps1
26 lines (24 loc) · 1.18 KB
/
run-server.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
param(
[string]$ServerIp="",
[string]$HardwareVersion="",
[string]$Hardware="",
[string]$Url="",
[string]$Name=""
)
$PostgreSql='--postgresql "Server=TFB-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Max Auto Prepare=3"'
$MySql='--mysql "Server=TFB-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;SslMode=None;ConnectionReset=false"'
$MsSql='--mssql "Server=TFB-database;Database=hello_world;User Id=sa;Password=Benchmarkdbp@55;Max Pool Size=100;"'
$MongoDb='--mongodb "mongodb://TFB-database:27017?maxPoolSize=1024"'
# "--network host" - Better performance than the default "bridge" driver
# "-v /var/run/docker.sock" - Give container access to the host docker daemon
docker run `
-d `
--log-opt max-size=10m `
--log-opt max-file=3 `
--name benchmarks-server `
-p 5001:5001 `
--restart always `
-v /var/run/docker.sock:/var/run/docker.sock `
benchmarks `
bash -c `
"dotnet run -c Debug --project src/BenchmarksServer/BenchmarksServer.csproj -n 10.0.75.0 --url http://*:5001 --hardware physical --hardware-version laptop"