# The bridge has no dependencies, so the image is Node plus two files.
# State (posts, DMs, seen events) lives on the /data volume and survives
# a container rebuild.
FROM node:24-alpine
WORKDIR /app
COPY package.json bridge.mjs ./
RUN mkdir /data && chown node:node /data
ENV BRIDGE_STATE_FILE=/data/bridge-state.json PORT=8080
VOLUME /data
USER node
EXPOSE 8080
CMD ["node", "bridge.mjs"]
