mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 01:41:23 +02:00
- Add NestJS service with Telegraf for Telegram bot functionality - Implement commands: /today, /tomorrow, /week, /next, /calendars, /add - Create database schema for user linking and reminder settings - Add Calendar API client for fetching events - Implement reminder scheduler with morning briefing support - Add message formatters for German locale - Include Dockerfile and CLAUDE.md documentation - Update TELEGRAM_BOTS.md with new bot status Commands implemented: - /today, /tomorrow, /week - View events - /next [n] - View next n events - /calendars - List calendars - /remind - Reminder settings - /link, /unlink - Account management - /status - Connection status https://claude.ai/code/session_01LwmhvhKpEsvVtY1ZKhYu6f
45 lines
1.2 KiB
Docker
45 lines
1.2 KiB
Docker
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
COPY services/telegram-calendar-bot/package.json ./services/telegram-calendar-bot/
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile --filter @manacore/telegram-calendar-bot
|
|
|
|
# Copy source
|
|
COPY services/telegram-calendar-bot ./services/telegram-calendar-bot
|
|
|
|
# Build
|
|
WORKDIR /app/services/telegram-calendar-bot
|
|
RUN pnpm build
|
|
|
|
# Production image
|
|
FROM node:20-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
# Copy built application
|
|
COPY --from=builder /app/services/telegram-calendar-bot/dist ./dist
|
|
COPY --from=builder /app/services/telegram-calendar-bot/package.json ./
|
|
COPY --from=builder /app/services/telegram-calendar-bot/node_modules ./node_modules
|
|
|
|
# Set environment
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3303
|
|
|
|
EXPOSE 3303
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3303/health || exit 1
|
|
|
|
CMD ["node", "dist/main.js"]
|