Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何在自己的服务器上部署OneLine?

2025-08-25 1.1 K

OneLine提供了多种部署方式,以下是详细的部署指南:

1. 获取项目源代码

首先需要从GitHub获取项目源码:

  • 访问GitHub仓库:https://github.com/chengtx809/OneLine
  • 点击Code按钮选择Download ZIP下载压缩包,或者使用git克隆命令:
    git clone https://github.com/chengtx809/OneLine.git
  • 解压文件或进入克隆的项目目录

2. Configuration environment

项目需要配置AI API支持,两种配置方式:

Front-end configuration:

启动应用后通过网页界面配置API端点、模型和密钥

环境变量配置(推荐):

复制.env.example文件为.env.local并填写以下内容:

  • AI API地址(NEXT_PUBLIC_API_ENDPOINT)
  • 使用的模型名称(NEXT_PUBLIC_API_MODEL)
  • API密钥(NEXT_PUBLIC_API_KEY)
  • 访问密码(可选,NEXT_PUBLIC_ACCESS_PASSWORD)

3. Docker部署(推荐)

使用官方提供的Docker镜像:

  1. Pull the mirror image:
    docker pull justincnn/oneline
  2. Run the container:
    docker run -p 3000:3000 justincnn/oneline
  3. 访问http://localhost:3000使用

4. 手动部署

需要安装Node.js(v16+):

  • fulfillmentnpm installInstallation of dependencies
  • (of a computer) runnpm run devStarting the Development Server
  • 访问http://localhost:3000

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish