GeekAI User ManualGeekAI User Manual
  • Guide

    • Introduction
    • Quick Deployment
    • Advanced Deployment
  • Configuration

    • AI Drawing Configuration
    • Music and Video
    • File Storage Configuration
  • Upgrade

    • Smooth Upgrade
  • Development

    • Development and Build
    • How to Skip License Verification
  • Guide

    • Introduction
    • Deployment
  • Configuration

    • Coze Agent
    • Dify Agent
    • Alibaba Cloud Bailian Agent
  • Upgrade

    • Geek-Agent v1.0.2
    • Geek-Agent v1.0.3
  • GeekAI-PLUS (With Admin Panel)
  • GeekAI-Agent (With Admin Panel)
  • AI Study Notes

    • 01-Basic Concepts of Stable Diffusion
    • 02-Core Technology Decryption of DeepSeek R1
    • 03-DeepSeek R1 User Guide (Continuously Updated)
    • 03-Some Personal Thoughts on AI Agent
    • 04-Understanding MCP and A2A Protocols
  • Tech Community
  • GitHub
  • Gitee
  • GitCode
  • 简体中文
  • en-US
GitHub
  • Guide

    • Introduction
    • Quick Deployment
    • Advanced Deployment
  • Configuration

    • AI Drawing Configuration
    • Music and Video
    • File Storage Configuration
  • Upgrade

    • Smooth Upgrade
  • Development

    • Development and Build
    • How to Skip License Verification
  • Guide

    • Introduction
    • Deployment
  • Configuration

    • Coze Agent
    • Dify Agent
    • Alibaba Cloud Bailian Agent
  • Upgrade

    • Geek-Agent v1.0.2
    • Geek-Agent v1.0.3
  • GeekAI-PLUS (With Admin Panel)
  • GeekAI-Agent (With Admin Panel)
  • AI Study Notes

    • 01-Basic Concepts of Stable Diffusion
    • 02-Core Technology Decryption of DeepSeek R1
    • 03-DeepSeek R1 User Guide (Continuously Updated)
    • 03-Some Personal Thoughts on AI Agent
    • 04-Understanding MCP and A2A Protocols
  • Tech Community
  • GitHub
  • Gitee
  • GitCode
  • 简体中文
  • en-US
GitHub
  • GeekAI-Plus

    • Introduction
    • Quick Deployment
    • Advanced Deployment
    • Windows System Deployment
    • Deploy with Baota
    • Common Errors
  • Configuration

    • API Token Configuration
    • AI Drawing Configuration
    • Music and Video
    • File Storage Configuration
    • Payment Configuration
    • Gitee AI API Integration Guide
    • Other Service Configurations
    • Operational Strategies
  • Upgrade

    • Smooth Upgrade
    • GeekAI-PLUS-v4.1.6
    • GeekAI-PLUS-v4.1.8
    • GeekAI-PLUS-v4.1.9
    • GeekAI-PLUS-v4.2.1
    • GeekAI-PLUS-v4.2.2
    • GeekAI-PLUS-v4.2.3
    • GeekAI-PLUS-v4.2.4
  • Development

    • Development and Build
    • How to Skip License Verification

Note: Before reading this document, make sure you have installed both docker and docker-compose tools.

Whether it's one-click deployment or quick deployment, these two methods are provided for beginners to experience. For online production deployment, it is recommended to split the deployment. There are three reasons:

  1. Speed up startup time. Every time you restart the application, you actually only want to restart the geekai-api and geekai-web containers. The quick deployment method restarts all containers each time, which significantly extends the startup time.
  2. Reduce coupling between containers. For example, the database and Redis containers are usually not only needed for this project. Restarting them may affect other projects.
  3. Reduce service interruption. For example, if you update the MJ bot account information, you only need to restart the midjourney-proxy container, which will not cause your online service to be interrupted. However, if you are not using split deployment, you will need to restart all containers, which will cause your service to be interrupted.

First, you still need to clone the project:

git clone https://github.com/yangjian102621/geek-ai.git geekai

Split deployment is very simple. It involves deploying each container in the docker-compose.yaml file independently. The specific split plan can be as follows: except for the last two, geekai-api and geekai-web, which can be deployed together, all other containers need to be split separately. The simplest and most straightforward method is to copy the geekai directory five times.

cp -r geekai mysql
cp -r geekai redis

Then switch to each directory, edit the docker-compose.yaml file, keep the corresponding container configuration information, and delete the rest. Taking the MySQL container as an example, the trimmed docker-compose.yaml file should look like this:

version: '3'
services:
  # mysql
  geekai-mysql:
    image: mysql:8.0.33
    container_name: geekai-mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=12345678
    ports:
      - "3307:3306"
    volumes :
      - ./conf/mysql/my.cnf:/etc/mysql/my.cnf
      - ./data/mysql/data:/var/lib/mysql
      - ./logs/mysql:/var/log/mysql
      - ./data/mysql/init.d:/docker-entrypoint-initdb.d/

Other directories should be processed similarly. After processing, the most important step is: modify the configuration files. The advantage of deploying multiple containers in one docker-compose.yaml is that these containers belong to the same internal network, and containers can communicate with each other through container names. However, now that we have split the deployment, containers can only communicate through the host machine's IP address. Therefore, we need to replace all instances of container name communication in the configuration files with IP addresses. There are mainly two configuration files, with four places that need to be replaced. In conf/config.toml, two places need to be replaced: MySQL connection information and Redis connection information.

Assuming your local intranet address is 192.268.1.100, the modified file should look like this:

MysqlDns = "root:12345678@tcp(192.268.1.100:3307)/chatgpt_plus?charset=utf8mb4&collation=utf8mb4_unicode_ci&parseTime=True&loc=Local"

[Redis] # redis configuration
Host = "192.268.1.100"
Port = 6380
Password = "12345678"
DB = 0

After modification, start all containers. If all containers start successfully, the split deployment is complete.

Edit this page on GitHub
Prev
Quick Deployment
Next
Windows System Deployment
极客学长 © 2022-2025 版权所有 粤ICP备19122051号-1