diff --git a/code/utils/deploy-pokedex.js b/code/utils/deploy-pokedex.js index 9aa8162..532be1c 100644 --- a/code/utils/deploy-pokedex.js +++ b/code/utils/deploy-pokedex.js @@ -493,20 +493,29 @@ async function deploy() { console.log('\nāœ… Container started'); - // Health check - console.log('\nšŸ„ Performing health check...'); - const isHealthy = await healthCheck(sshConfig.host, config.port); - - if (!isHealthy) { - throw new Error('Health check failed - container is not responding'); + // Health checks + console.log('\nšŸ„ Performing health checks...'); + console.log(' Checking frontend...'); + const frontendHealthy = await healthCheck(sshConfig.host, config.port); + if (!frontendHealthy) { + throw new Error('Frontend health check failed - container is not responding'); } + console.log(' āœ… Frontend healthy'); - console.log('āœ… Health check passed'); + console.log(' Checking backend...'); + const backendHealthy = await healthCheck(sshConfig.host, config.backendPort); + if (!backendHealthy) { + throw new Error('Backend health check failed - container is not responding'); + } + console.log(' āœ… Backend healthy'); + + console.log('\nāœ… All health checks passed'); console.log(`\nšŸŽ‰ Deployment successful!`); - console.log(`🌐 HTTP: http://${sshConfig.host}:${config.port}`); + console.log(`🌐 Frontend: http://${sshConfig.host}:${config.port}`); if (config.sslPort) { - console.log(`šŸ”’ HTTPS: https://${sshConfig.host}:${config.sslPort}`); + console.log(`šŸ”’ HTTPS: https://${sshConfig.host}:${config.sslPort}`); } + console.log(`šŸ”Œ Backend: http://${sshConfig.host}:${config.backendPort}`); ssh.dispose(); } catch (error) {