Public Access
1
0

refactor: optimize Dockerfile for multi-platform builds and add healthcheck script

This commit is contained in:
2025-08-23 18:11:39 -04:00
parent a54d6e445f
commit a100ea3159
4 changed files with 66 additions and 23 deletions

20
healthcheck.js Normal file
View File

@@ -0,0 +1,20 @@
const http = require('http');
const options = {
host: 'localhost',
port: 3000,
path: '/',
timeout: 2000,
};
const request = http.request(options, (res) => {
console.log(`HEALTHCHECK STATUS: ${res.statusCode}`);
process.exit(res.statusCode === 200 ? 0 : 1);
});
request.on('error', (err) => {
console.error('HEALTHCHECK ERROR', err);
process.exit(1);
});
request.end();