advertise over beacon v2 as metamesh.enrich/<id> so meta-sort's Plugins page can find it (Scan -> Add)
Build and Push Docker Image / build (push) Failing after 14s

This commit is contained in:
Worph
2026-10-04 17:19:15 +00:00
parent 2d5bef71fd
commit a242b63c77
2 changed files with 191 additions and 2 deletions
+3 -2
View File
@@ -24,6 +24,7 @@
import Fastify from 'fastify';
import type { HealthResponse, ProcessRequest, ProcessResponse, CallbackPayload, ConfigureRequest, ConfigureResponse } from './types.js';
import { manifest, process as processFile } from './plugin.js';
import { startBeacon, stopBeacon } from './beacon-advertise.js';
const app = Fastify({ logger: true });
let ready = false;
@@ -47,5 +48,5 @@ app.post<{ Body: ProcessRequest }>('/process', async (request, reply) => {
});
const port = parseInt(process.env.PORT || '8080', 10);
app.listen({ port, host: '0.0.0.0' }).then(() => { ready = true; console.log(`[${manifest.id}] Listening on port ${port}`); });
process.on('SIGTERM', async () => { ready = false; await app.close(); process.exit(0); });
app.listen({ port, host: '0.0.0.0' }).then(() => { startBeacon(manifest.id, manifest.version, port); ready = true; console.log(`[${manifest.id}] Listening on port ${port}`); });
process.on('SIGTERM', async () => { await stopBeacon(); ready = false; await app.close(); process.exit(0); });