chatgpt-web icon indicating copy to clipboard operation
chatgpt-web copied to clipboard

为什么我按照你的模式去部署的,但是直接访问 80 端口直接报错了啊

Open James-handsome opened this issue 1 year ago • 6 comments

image

image

version: '3'

services:
  app:
    image: chenzhaoyu94/chatgpt-web # 总是使用latest,更新时重新pull该tag镜像即可
    ports:
      - 3002:3002
    environment:
      # 二选一
      OPENAI_API_KEY: sk-dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
      OPENAI_API_MODEL: gpt-3.5-turbo
    
      AUTH_SECRET_KEY: 11111111
     
      TIMEOUT_MS: 60000
      
  nginx:
    image: nginx:alpine
    ports:
      - '80:80'
    expose:
      - '80'
    volumes:
      - ./nginx/html:/usr/share/nginx/html
      - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
    links:
      - app


这是我的配置项,难道哪里不对吗? 80端口访问不了项目

James-handsome avatar Mar 11 '23 11:03 James-handsome

其实不用nginx,把上面chenzhaoyu94/chatgpt-web端口映射改成 80:3002 就好了

CaptainYan2 avatar Mar 11 '23 11:03 CaptainYan2

其实不用nginx,把上面chenzhaoyu94/chatgpt-web端口映射改成 80:3002 就好了

In fact, do not use nginx, change the above chenzhaoyu94/chatgpt-web port mapping to 80:3002

没有nginx 无法使用https

James-handsome avatar Mar 11 '23 11:03 James-handsome

其实不用nginx,把上面chenzhaoyu94/chatgpt-web端口映射改成 80:3002 就好了 In fact, do not use nginx, change the above chenzhaoyu94/chatgpt-web port mapping to 80:3002

没有nginx 无法使用https

那用nginx proxy manager吧

CaptainYan2 avatar Mar 11 '23 11:03 CaptainYan2

docker run --name chatgpt-web -d -p 80:3002 --env OPENAI_API_KEY=你的ApiKey chenzhaoyu94/chatgpt-web

Chanzhaoyu avatar Mar 11 '23 12:03 Chanzhaoyu

docker run --name chatgpt-web -d -p 80:3002 --env OPENAI_API_KEY=你的ApiKey chenzhaoyu94/chatgpt-web

我使用的docker 服务编排,直接用 docker-compose up -d 的方式启动的

image

James-handsome avatar Mar 11 '23 13:03 James-handsome

image

James-handsome avatar Mar 11 '23 13:03 James-handsome

以解决

James-handsome avatar Mar 12 '23 01:03 James-handsome

image

你好,这个是解决之后的配置吗?

artisth avatar Mar 31 '23 15:03 artisth