This commit is contained in:
+1
-1
@@ -77,6 +77,6 @@ USER nestjs
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=30s \
|
||||
CMD curl -f http://localhost:3000/health || exit 1
|
||||
CMD curl -f http://localhost:3000/ping || exit 1
|
||||
|
||||
CMD ["node", "dist/main"]
|
||||
|
||||
@@ -19,6 +19,11 @@ export class HealthController {
|
||||
private disk: DiskHealthIndicator
|
||||
) {}
|
||||
|
||||
@Get('ping')
|
||||
ping() {
|
||||
return { status: 'ok', timestamp: new Date().toISOString() };
|
||||
}
|
||||
|
||||
@Get('health')
|
||||
@HealthCheck()
|
||||
check() {
|
||||
|
||||
Reference in New Issue
Block a user