mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
Complete GDPR-compliant bot suite for Matrix: matrix-stats-bot (port 3312): - Analytics reports from Umami - Commands: !stats, !today, !week, !realtime, !users - Scheduled daily/weekly reports to Matrix room matrix-project-doc-bot (port 3313): - Project documentation with photos, voice, text - Voice transcription via OpenAI Whisper - Blog generation with 5 styles (casual, technical, tutorial, social, story) - Commands: !new, !projects, !switch, !status, !generate, !export - Uses PostgreSQL + S3 (MinIO) for storage Changes: - docker-compose.macmini.yml: Added both Matrix bots - health-check.sh: Added health checks for both bots Environment variables required: - MATRIX_STATS_BOT_TOKEN, MATRIX_PROJECT_DOC_BOT_TOKEN - OPENAI_API_KEY (for Project Doc Bot) https://claude.ai/code/session_01E3r5aFW3YLAhEJfsL2ryhv
25 lines
810 B
Docker
25 lines
810 B
Docker
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
RUN pnpm install --frozen-lockfile || pnpm install
|
|
COPY . .
|
|
RUN pnpm build
|
|
|
|
FROM node:20-alpine AS runner
|
|
WORKDIR /app
|
|
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
RUN mkdir -p /app/data
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
RUN pnpm install --prod --frozen-lockfile || pnpm install --prod
|
|
COPY --from=builder /app/dist ./dist
|
|
RUN addgroup --system --gid 1001 nodejs
|
|
RUN adduser --system --uid 1001 nestjs
|
|
RUN chown -R nestjs:nodejs /app
|
|
USER nestjs
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3313/health || exit 1
|
|
|
|
EXPOSE 3313
|
|
CMD ["node", "dist/main.js"]
|