mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
GDPR-compliant task management bot for Matrix with: - Task CRUD: !add, !list, !done, !delete - Priority support: !p1 to !p4 - Date shortcuts: @heute, @morgen, @übermorgen - Project tags: #projektname - Natural language keywords: hilfe, zeige aufgaben, heute - Welcome messages and auto-pin help on room join - Per-user task isolation via Matrix user ID - Local JSON storage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
936 B
Docker
48 lines
936 B
Docker
# Build stage
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package.json ./
|
|
|
|
# Install all dependencies (including devDependencies for build)
|
|
RUN npm install
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build TypeScript
|
|
RUN rm -rf dist && npx tsc -p tsconfig.build.json
|
|
|
|
# Production stage
|
|
FROM node:20-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
# Create data directory for storage
|
|
RUN mkdir -p /app/data
|
|
|
|
# Copy package files
|
|
COPY package.json ./
|
|
|
|
# Install production dependencies only
|
|
RUN npm install --omit=dev
|
|
|
|
# Copy built application
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
# Create non-root user
|
|
RUN addgroup -g 1001 -S nodejs && \
|
|
adduser -S nestjs -u 1001 && \
|
|
chown -R nestjs:nodejs /app
|
|
|
|
USER nestjs
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3314/health || exit 1
|
|
|
|
EXPOSE 3314
|
|
|
|
CMD ["node", "dist/main.js"]
|