- skill/SKILL.md: rewritten to 9 lines — 'status is automatic' - deploy-to-agents.sh: no AGENTS.md injection; deploys hook + npm install - install.sh: clean install flow; prints required env vars - deploy/status-watcher.service: systemd unit file - deploy/Dockerfile: containerized deployment (node:22-alpine) - src/live-status.js: deprecation warning + start-watcher/stop-watcher pass-through - README.md: full docs (architecture, install, config, upgrade guide, troubleshooting) - make check: 0 errors, 0 format issues - npm test: 59 unit + 36 integration = 95 tests passing
37 lines
960 B
Docker
37 lines
960 B
Docker
FROM node:22-alpine
|
|
|
|
LABEL description="Live Status v4 - OpenClaw session watcher daemon"
|
|
LABEL source="https://git.eeqj.de/ROOH/MATTERMOST_OPENCLAW_LIVESTATUS"
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files and install production dependencies only
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --production
|
|
|
|
# Copy source and supporting files
|
|
COPY src/ ./src/
|
|
COPY skill/ ./skill/
|
|
|
|
# Environment variables (required — set at runtime)
|
|
# MM_TOKEN, MM_URL, TRANSCRIPT_DIR, SESSIONS_JSON must be provided
|
|
ENV NODE_ENV=production \
|
|
LOG_LEVEL=info \
|
|
HEALTH_PORT=9090 \
|
|
THROTTLE_MS=500 \
|
|
IDLE_TIMEOUT_S=60 \
|
|
MAX_STATUS_LINES=15 \
|
|
MAX_ACTIVE_SESSIONS=20 \
|
|
PID_FILE=/tmp/status-watcher.pid
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD wget -qO- http://localhost:${HEALTH_PORT}/health || exit 1
|
|
|
|
# Run as non-root
|
|
USER node
|
|
|
|
EXPOSE ${HEALTH_PORT}
|
|
|
|
CMD ["node", "src/watcher-manager.js", "start"]
|