mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 18:37:22 +01:00
add healthchecks to docker
This commit is contained in:
parent
7f49ca8627
commit
bdd8830c8e
9 changed files with 40 additions and 13 deletions
|
|
@ -60,6 +60,8 @@ public class Startup
|
|||
|
||||
// configure mare specific services
|
||||
ConfigureMareServices(services, mareConfig);
|
||||
|
||||
services.AddHealthChecks();
|
||||
}
|
||||
|
||||
private static void ConfigureMareServices(IServiceCollection services, IConfigurationSection mareConfig)
|
||||
|
|
@ -303,6 +305,8 @@ public class Startup
|
|||
endpoints.MapGrpcService<GrpcIdentityService>().AllowAnonymous();
|
||||
endpoints.MapGrpcService<GrpcConfigurationService<ServerConfiguration>>().AllowAnonymous();
|
||||
}
|
||||
|
||||
endpoints.MapHealthChecks("/health").WithMetadata(new AllowAnonymousAttribute());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ public class Startup
|
|||
);
|
||||
|
||||
services.AddHostedService(p => (MareConfigurationServiceClient<MareConfigurationAuthBase>)p.GetService<IConfigurationService<MareConfigurationAuthBase>>());
|
||||
|
||||
services.AddHealthChecks();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
|
|
@ -161,6 +163,7 @@ public class Startup
|
|||
e.MapGrpcService<GrpcFileService>();
|
||||
}
|
||||
e.MapControllers();
|
||||
e.MapHealthChecks("/health").WithMetadata(new AllowAnonymousAttribute());
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue