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 13s

This commit is contained in:
Worph
2026-10-04 17:19:23 +00:00
parent 316db6ad03
commit ae1ee8c0b4
2 changed files with 191 additions and 0 deletions
+3
View File
@@ -18,6 +18,7 @@
import Fastify from 'fastify';
import type { HealthResponse, ProcessRequest, ProcessResponse, CallbackPayload, ConfigureRequest, ConfigureResponse } from './types.js';
import { manifest, process as processFile, configure } from './plugin.js';
import { startBeacon, stopBeacon } from './beacon-advertise.js';
const app = Fastify({ logger: true });
let ready = false;
@@ -69,11 +70,13 @@ 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(() => {
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);