- Dashboard Overview with real-time status display - Live Log Viewer (scrollable, filterable) - Config Editor with JSON syntax highlighting - Model Switcher for provider management - Provider Manager for API key configuration - Quick Actions for common tasks - API Routes: status, logs, config, actions, models, providers Tech Stack: - Next.js 14 (App Router) - TypeScript - Tailwind CSS - shadcn/ui components - CodeMirror for JSON editing - Docker support with docker-compose
53 lines
1.1 KiB
Docker
53 lines
1.1 KiB
Docker
FROM node:22-alpine AS base
|
|
|
|
# Install dependencies for native modules
|
|
RUN apk add --no-cache python3 make g++ sqlite
|
|
|
|
# Install better-sqlite3
|
|
WORKDIR /app
|
|
RUN npm install better-sqlite3 --build-from-source --no-save
|
|
|
|
# Dependencies
|
|
FROM base AS deps
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm ci --only=production && npm cache clean --force
|
|
|
|
# Builder
|
|
FROM base AS builder
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
RUN npx next build
|
|
|
|
# Runner
|
|
FROM base AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
RUN addgroup --system --gid 1001 nodejs
|
|
RUN adduser --system --uid 1001 nextjs
|
|
|
|
# Install better-sqlite3
|
|
RUN npm install better-sqlite3 --build-from-source --no-save
|
|
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/.next/standalone ./
|
|
COPY --from=builder /app/.next/static ./.next/static
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
# Create data directory
|
|
RUN mkdir -p /app/data && chown -R nextjs:nodejs /app
|
|
|
|
USER nextjs
|
|
|
|
EXPOSE 3000
|
|
|
|
ENV PORT=3000
|
|
ENV HOSTNAME="0.0.0.0"
|
|
|
|
CMD ["node", "server.js"]
|