mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 18:19:39 +02:00
- NestJS-based Telegram bot with nestjs-telegraf - Ollama service for API communication with Gemma 3 4B - Commands: /start, /help, /models, /model, /mode, /clear, /status - Multiple modes: default, classify, summarize, translate, code - Chat history with context (last 10 messages) - User access control via TELEGRAM_ALLOWED_USERS - Health endpoint for monitoring - Updated MAC_MINI_SERVER.md with Ollama documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
44 lines
712 B
Docker
44 lines
712 B
Docker
# Build stage
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile || pnpm install
|
|
|
|
# Copy source
|
|
COPY . .
|
|
|
|
# Build
|
|
RUN pnpm build
|
|
|
|
# Production stage
|
|
FROM node:20-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
|
|
# Install production dependencies only
|
|
RUN pnpm install --prod --frozen-lockfile || pnpm install --prod
|
|
|
|
# Copy built application
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
# Set environment
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3301
|
|
|
|
EXPOSE 3301
|
|
|
|
CMD ["node", "dist/main.js"]
|