botAgentHub / Dockerfile
anand0x's picture
feat: init hf deploy
274aa98 unverified
Raw
History Blame Contribute Delete
803 Bytes
FROM node:22-alpine AS builder
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/shared ./packages/shared
COPY apps/indexer ./apps/indexer
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @bot-agent-hub/indexer build
FROM node:22-alpine
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/shared/package.json ./packages/shared/package.json
COPY apps/indexer/package.json ./apps/indexer/package.json
RUN pnpm install --frozen-lockfile --prod --filter @bot-agent-hub/indexer
COPY --from=builder /app/apps/indexer/dist ./apps/indexer/dist
WORKDIR /app/apps/indexer
# Hugging Face Spaces requires port 7860
EXPOSE 7860
ENV INDEXER_PORT=7860
ENV PORT=7860
CMD ["node", "dist/server.js"]