FROM node:22.22.0-bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl procps \
    && rm -rf /var/lib/apt/lists/* \
    && npm install --global --ignore-scripts --no-audit --no-fund botsync@0.5.3
COPY supervise.mjs /app/supervise.mjs
ENV BOTSYNC_ROOT=/sync
CMD ["node", "/app/supervise.mjs"]
