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.");
|
||||
}
|
||||
Reference in New Issue
Block a user