Add deployment mode
This commit is contained in:
@@ -327,4 +327,16 @@ app.UseEndpoints(endpoints =>
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.Run();
|
// Conditionally run the application based on deployment mode
|
||||||
|
var deploymentMode = builder.Configuration.GetValue<bool>("DeploymentMode", false);
|
||||||
|
|
||||||
|
if (!deploymentMode)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Application starting in normal mode...");
|
||||||
|
app.Run();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Application configured for deployment mode - skipping app.Run()");
|
||||||
|
Console.WriteLine("All services have been configured and the application is ready for deployment.");
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"RunOrleansGrains": false,
|
"RunOrleansGrains": false,
|
||||||
|
"DeploymentMode": false,
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
"Dsn": "https://698e00d7cb404b049aff3881e5a47f6b@bugcenter.apps.managing.live/1"
|
"Dsn": "https://698e00d7cb404b049aff3881e5a47f6b@bugcenter.apps.managing.live/1"
|
||||||
},
|
},
|
||||||
"RunOrleansGrains": true,
|
"RunOrleansGrains": true,
|
||||||
|
"DeploymentMode": false,
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"WorkerBotManager": true,
|
"WorkerBotManager": true,
|
||||||
"WorkerBalancesTracking": true,
|
"WorkerBalancesTracking": true,
|
||||||
|
|||||||
@@ -67,5 +67,6 @@
|
|||||||
"ButtonExpirationMinutes": 10
|
"ButtonExpirationMinutes": 10
|
||||||
},
|
},
|
||||||
"RunOrleansGrains": true,
|
"RunOrleansGrains": true,
|
||||||
|
"DeploymentMode": false,
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user