- Implemented Smart Search Panel component for enhanced project and deliverable search functionality. - Introduced useSemanticSearch and useOllamaHealth hooks for managing search queries and AI availability. - Developed embedding-service to generate and store vector embeddings for projects and deliverables. - Created semantic-search-service to handle vector search, structural query detection, and LLM summarization. - Added support for hybrid search combining structural filters and semantic queries. - Integrated UI components for displaying search results and user interactions.
48 lines
1 KiB
Docker
48 lines
1 KiB
Docker
FROM node:22-alpine AS base
|
|
|
|
# Install dependencies only when needed
|
|
FROM base AS deps
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm ci --ignore-scripts
|
|
RUN npx prisma generate || true
|
|
|
|
# Rebuild source code only when needed
|
|
FROM base AS builder
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
# Generate Prisma client
|
|
RUN npx prisma generate
|
|
|
|
# Build the Next.js app
|
|
RUN npm run build
|
|
|
|
# Production image
|
|
FROM base AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
RUN addgroup --system --gid 1001 nodejs
|
|
RUN adduser --system --uid 1001 nextjs
|
|
|
|
COPY --from=builder /app/public ./public
|
|
|
|
# Copy Next.js standalone output
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
|
# Copy Prisma schema and migrations for runtime
|
|
COPY --from=builder /app/prisma ./prisma
|
|
COPY --from=builder /app/src/generated ./src/generated
|
|
|
|
USER nextjs
|
|
|
|
EXPOSE 3000
|
|
|
|
ENV PORT=3000
|
|
ENV HOSTNAME="0.0.0.0"
|
|
|
|
CMD ["node", "server.js"]
|