代码拉取完成,页面将自动刷新
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js image as a parent image
FROM node:18-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install --ignore-scripts
# Copy the TypeScript source code
COPY src ./src
COPY tsconfig.json ./
# Build the TypeScript code
RUN npm run build
# Use a lightweight image for the final build
FROM node:18-alpine
# Set the working directory
WORKDIR /app
# Copy the build files from the builder stage
COPY --from=builder /app/build ./build
COPY package.json ./
# Install only production dependencies
RUN npm ci --omit=dev
# Expose the port on which the server will run (if required)
# EXPOSE 8080
# Define environment variables
ENV GOOGLE_API_KEY=your-api-key-here
ENV GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id-here
# Run the application
ENTRYPOINT ["node", "build/index.js"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。