add Dockerfile
This commit is contained in:
@@ -56,7 +56,10 @@ var connectionString = builder.Configuration.GetConnectionString("MesbahDb");
|
||||
var connectionStringTestDb = builder.Configuration.GetConnectionString("TestDb");
|
||||
|
||||
#region Serilog
|
||||
var logDirectory = @"C:\Logs\Gozareshgir\";
|
||||
// Use Docker-compatible log path
|
||||
var logDirectory = builder.Environment.IsDevelopment()
|
||||
? @"C:\Logs\Gozareshgir\"
|
||||
: "/app/Logs";
|
||||
|
||||
if (!Directory.Exists(logDirectory))
|
||||
{
|
||||
@@ -541,6 +544,9 @@ app.MapHub<ProjectBoardHub>("api/pm/board");
|
||||
app.MapRazorPages();
|
||||
app.MapControllers();
|
||||
|
||||
// Health check endpoint for Docker
|
||||
app.MapGet("/health", () => Results.Ok(new { status = "Healthy", timestamp = DateTime.UtcNow }));
|
||||
|
||||
#endregion
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user