mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-08 18:05:10 +00:00
6893ece898
Lays the dormant data-plane foundation for Sencho Mesh. The pilot tunnel gains TCP forwarding frames (tcp_open / tcp_open_ack / tcp_close JSON plus a 0x04 TcpData binary type) and a TcpStream surface on the bridge so a future MeshService can ride the existing WSS tunnel for cross-node container traffic. The agent rejects every tcp_open with mesh_not_enabled until a follow-up PR wires the Dockerode resolver gated by a mesh_stacks opt-in table; ships dormant. A new top-level mesh-sidecar/ package provides the per-node container that will host the L4 forwarder + control WS in production. Built as a small Node 22 alpine image and published in lockstep with the main sencho image via a parallel docker-publish workflow job. Tests cover protocol roundtrips on both packages and the sidecar forwarder end-to-end including resolve, splice, close, and stats.
18 lines
410 B
Docker
18 lines
410 B
Docker
# Multi-stage build for the Sencho Mesh sidecar.
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json tsconfig.json ./
|
|
RUN npm install --no-audit --no-fund
|
|
COPY src ./src
|
|
RUN npm run build
|
|
|
|
FROM node:22-alpine AS runtime
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
COPY package.json ./
|
|
RUN npm install --omit=dev --no-audit --no-fund
|
|
COPY --from=build /app/dist ./dist
|
|
|
|
USER node
|
|
CMD ["node", "dist/index.js"]
|