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"]