mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
jina-ai: billing for saas service (#55)
* wip: jina billing * wip * fix: build issues * ci: cd gh action * fix: make ci happy
This commit is contained in:
50
jina-ai/Dockerfile
Normal file
50
jina-ai/Dockerfile
Normal file
@@ -0,0 +1,50 @@
|
||||
# ---- BUILD STAGE ----
|
||||
FROM node:20-slim AS builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY ./package*.json ./
|
||||
COPY ./jina-ai/package*.json ./jina-ai/
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
WORKDIR /app/jina-ai
|
||||
RUN npm ci
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy application code
|
||||
COPY ./src ./src
|
||||
COPY ./config.json ./
|
||||
COPY ./tsconfig.json ./tsconfig.json
|
||||
RUN npm run build
|
||||
|
||||
COPY ./jina-ai/src ./jina-ai/src
|
||||
COPY ./jina-ai/tsconfig.json ./jina-ai/tsconfig.json
|
||||
WORKDIR /app/jina-ai
|
||||
RUN npm run build
|
||||
|
||||
# ---- PRODUCTION STAGE ----
|
||||
FROM node:20 AS production
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app ./
|
||||
# Copy config.json and built files from builder
|
||||
|
||||
WORKDIR /app/jina-ai
|
||||
|
||||
# Set environment variables (Recommended to set at runtime, avoid hardcoding)
|
||||
ENV GEMINI_API_KEY=${GEMINI_API_KEY}
|
||||
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
|
||||
ENV JINA_API_KEY=${JINA_API_KEY}
|
||||
ENV BRAVE_API_KEY=${BRAVE_API_KEY}
|
||||
|
||||
# Expose the port the app runs on
|
||||
EXPOSE 3000
|
||||
|
||||
# Set startup command
|
||||
CMD ["node", "./dist/server.js"]
|
||||
Reference in New Issue
Block a user