xtekky / chatgpt-clone

ChatGPT interface with better UI
https://g4f.ai
GNU General Public License v3.0
3.42k stars 1.02k forks source link

Crashes on Deploy using Docker #96

Open Type-32 opened 1 year ago

Type-32 commented 1 year ago

I followed the steps (via installing requirements and doing python stuff) and when I do docker compose up the container crashes on start. This is the log from my portainer:

Running on port 8501
 * Serving Flask app 'server.app'
 * Debug mode: off
Address not available

I checked all my ports in docker-compose.yml and config.json to be of port 8501:8501 and 8501, but it does not work.

docker-compose.yml

version: '3.5'

services:
  chatgpt-clone:
    image: chatgpt-clone
    container_name: chatgpt-clone
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8501:8501"

config.json

{

    "site_config": {
        "host" : "0.0.0.0",
        "port" : 8501,
        "debug": false
    },
    "openai_key": "sk-[REDACTED]",

    "openai_api_base": "https://api.openai.com",
    "proxy": {
    "enable": false,
        "http": "127.0.0.1:7890",
        "https": "127.0.0.1:7890"
    }
}
JustinGuese commented 1 year ago

try a "higher" port as lower ones are usually blocked by the OS

    ports:
      - "31000:8501"
Type-32 commented 1 year ago

Didn't work for me. And also changing the port seems to do no effect; the logs from portainer still says that is it "Running on Port 8501" even after I've changed the port to 31500.

BusTopGamer commented 1 year ago

I used portainer.io to deploy it. Create "New stack" choose github option then copy paste main github link in this case https://github.com/xtekky/chatgpt-clone then "diploy". It will handle creating container for you and rest. I use Portainer for all my docker containers. I am using it and no issues at all. give it a try.