็“œ่€ๅธˆ๐Ÿถ

็“œ่€ๅธˆใฎๅšๅฎข๐Ÿถ

็“œ่€ๅธˆ็š„ๅšๅฎขๅ“ฆใ€‚

Quickly Build ChatGPT Web Version with Docker

Docker Quick Setup for ChatGPT Web Version#

This guide provides detailed steps on how to quickly set up a visually appealing and stable ChatGPT web version using Docker. The setup process does not depend on a specific network environment.

image

Get OpenAI API Key#

Environment Deployment#

  1. Update the system environment and install necessary tools:

    apt update -y && apt upgrade -y && apt install -y curl wget sudo socat
    
  2. Install Docker:

    curl -fsSL https://get.docker.com | sh
    
  3. Install Docker Compose:

    curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    

GPT Setup Method 1#

  1. Create GPT directory and configuration file:

    cd /home/ && mkdir gpt && cd gpt && nano docker-compose.yml
    
  2. Edit the compose configuration file (docker-compose.yml) to configure the service details.

  3. Run Docker Compose to start the service:

    cd /home/gpt && docker-compose up -d
    

GPT Setup Method 2#

  • Use a one-click Docker command to run the service, making sure to modify it with your own API key and other configurations:
    docker run -d --name gpt-app-1 -p 3002:3002 -e OPENAI_API_KEY=<Your API Key> -e OPENAI_API_BASE_URL=https://api.openai.com -e AUTH_SECRET_KEY=<Your Password> -e OPENAI_API_MODEL=gpt-3.5-turbo chenzhaoyu94/chatgpt-web
    

NGINX Reverse Proxy to Domain#

  1. Create the nginx directory structure, apply for a certificate, and configure nginx.
  2. Configure the reverse proxy to proxy to the specified IP and port.
  3. Deploy the NGINX container and check its running status.

Auto Start on Boot#

  • Set containers to start automatically:
    docker update --restart=always nginx
    docker update --restart=always gpt-app-1
    

Common Docker Commands#


Original author's GitHub address: Chanzhaoyu/chatgpt-web

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.