Ai
1 Star 0 Fork 0

mikefengshi/nextjs-ollama-llm-ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 786 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jakob Hoeg 提交于 2025-01-29 19:35 +08:00 . add Dockerfile and installation guide
# Use Node.js as the base image
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Set a build-time argument for OLLAMA_URL with a default value
ARG OLLAMA_URL=http://127.0.0.1:11434
ENV OLLAMA_URL=${OLLAMA_URL}
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
# Copy built files from the builder stage
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/package-lock.json ./package-lock.json
COPY --from=builder /app/node_modules ./node_modules
# Set environment variable with a default value that can be overridden at runtime
ENV OLLAMA_URL=http://127.0.0.1:11434
ENV PORT=3000
EXPOSE 3000
CMD ["npm", "start"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mikefengshi/nextjs-ollama-llm-ui.git
git@gitee.com:mikefengshi/nextjs-ollama-llm-ui.git
mikefengshi
nextjs-ollama-llm-ui
nextjs-ollama-llm-ui
master

搜索帮助