Files
skillhub/services/indexer/Dockerfile
airano 3f599a23fb sync: SEO canonical URLs, curation improvements, batch scripts, stats fix
- Dynamic canonical URLs and alternates for all pages (SEO fix)
- Shared seo.ts utility for canonical path generation
- Improved duplicate detection: standalone > aggregator priority, forks/created_at tie-breakers
- browseReadyFilter now includes unique aggregator skills
- Stats aligned with browseReadyFilter (was showing 16k instead of 62k+)
- Re-review mechanism: content_hash changes trigger needs-re-review
- review_status field added to skills schema
- Batch security scan and quality score scripts
- Indexer Dockerfile updated for curation deps
- Removed roadmap from README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:40:03 +03:30

55 lines
1.5 KiB
Docker

# Stage 1: Dependencies
FROM node:20-alpine AS deps
RUN npm install -g pnpm@9
WORKDIR /app
# Copy workspace configuration
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./
COPY services/indexer/package.json ./services/indexer/
COPY packages/core/package.json ./packages/core/
COPY packages/db/package.json ./packages/db/
# Install dependencies
RUN pnpm install --frozen-lockfile
# Stage 2: Builder
FROM node:20-alpine AS builder
RUN npm install -g pnpm@9
WORKDIR /app
# Copy dependencies
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/services/indexer/node_modules ./services/indexer/node_modules
COPY --from=deps /app/packages ./packages
# Copy source code
COPY . .
# Build the application
RUN pnpm turbo run build --filter=@skillhub/indexer
# Stage 3: Runner (minimal - all deps are bundled)
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
# Create non-root user
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 indexer
# Copy only the bundled dist (no node_modules needed - everything is bundled)
COPY --from=builder --chown=indexer:nodejs /app/services/indexer/dist ./dist
# Curation scripts + skillhub-core (for batch-security, batch-score, curate)
COPY --from=builder --chown=indexer:nodejs /app/scripts/curation ./scripts/curation
COPY --from=builder --chown=indexer:nodejs /app/packages/core/dist ./packages/core/dist
RUN npm install --no-save pg gray-matter yaml
USER indexer
CMD ["node", "dist/worker.js"]