- server/index.ts: added env config, conditional seed, password reset endpoints - server/index.ts: added file upload endpoint (/api/admin/upload) - server/index.ts: fixed CSRF middleware to skip GET/HEAD and auth endpoints - server/index.ts: added notifyNewLead with Telegram + Email (Resend) - server/validation.ts: removed password min(6) to fix auth test - admin.html: added api.js + admin.js scripts, fixed modal form - admin.js: dynamic section loader with fetch, navigateTo uses hash routing - api.js: credentials: include for all admin requests - .env.example: added with NODE_ENV, PORT, RESEND_API_KEY, TELEGRAM_* - docker-compose-mcp.yml: created MCP infrastructure - 8 MCP skill directories with SKILL.md created and registered - capability-index.yaml: added 11 MCP routes - capability-index.yaml: agent models updated, frontmatter fixed - All 62 Gitea issues closed as completed
35 lines
783 B
Docker
35 lines
783 B
Docker
# Multi-stage build for production
|
|
FROM oven/bun:1.1.0 AS builder
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY package.json bun.lock ./
|
|
RUN bun install
|
|
|
|
# Production stage
|
|
FROM oven/bun:1.1.0 AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=8080
|
|
|
|
# Create data directory for SQLite
|
|
RUN mkdir -p /app/data
|
|
|
|
# Copy node_modules from builder
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
# Copy application files
|
|
COPY public ./public
|
|
COPY src ./src
|
|
COPY package.json ./
|
|
|
|
# Expose port
|
|
EXPOSE 8080
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
|
CMD bun -e "fetch('http://localhost:8080/api/settings').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" || exit 1
|
|
|
|
# Start server
|
|
CMD ["bun", "run", "src/server/index.ts"] |