feat: add debug entrypoint script and enhance health check logging
All checks were successful
Build And Push Image / docker (push) Successful in 2m33s

This commit is contained in:
2025-08-07 02:56:53 +02:00
parent 378e730c68
commit d8420b8f9e
4 changed files with 150 additions and 3 deletions

View File

@@ -1,12 +1,25 @@
export default defineEventHandler(async (event) => {
console.log('🏥 Health check requested at:', new Date().toISOString());
try {
const config = useRuntimeConfig();
// Basic health check - can be expanded to check database, storage, etc.
const health = {
status: 'healthy',
timestamp: new Date().toISOString(),
uptime: process.uptime(),
version: process.version,
environment: process.env.NODE_ENV,
port: process.env.NUXT_PORT || process.env.PORT || 6060,
checks: {
server: 'healthy',
config: {
keycloak: !!config.keycloak?.issuer,
nocodb: !!config.nocodb?.url,
session: !!config.sessionSecret,
encryption: !!config.encryptionKey,
},
// Add more checks as needed
// database: await checkDatabase(),
// storage: await checkStorage(),
@@ -14,8 +27,11 @@ export default defineEventHandler(async (event) => {
},
};
console.log('✅ Health check passed:', health.status);
return health;
} catch (error) {
console.error('❌ Health check failed:', error);
throw createError({
statusCode: 503,
statusMessage: 'Service Unavailable',