version: '3' services: app: image: kerwin1202/chatgpt-web # 总是使用latest,更新时重新pull该tag镜像即可 container_name: chatgptweb restart: unless-stopped ports: - 3002:3002 depends_on: - database environment: TZ: Asia/Shanghai # 访问jwt加密参数,可选 不为空则允许登录 同时需要设置 MONGODB_URL AUTH_SECRET_KEY: # 每小时最大请求次数,可选,默认无限 MAX_REQUEST_PER_HOUR: 0 # 超时,单位毫秒,可选 TIMEOUT_MS: 600000 # Socks代理,可选,和 SOCKS_PROXY_PORT 一起时生效 SOCKS_PROXY_HOST: # Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效 SOCKS_PROXY_PORT: # Socks代理用户名,可选,和 SOCKS_PROXY_HOST & SOCKS_PROXY_PORT 一起时生效 SOCKS_PROXY_USERNAME: # Socks代理密码,可选,和 SOCKS_PROXY_HOST & SOCKS_PROXY_PORT 一起时生效 SOCKS_PROXY_PASSWORD: # 网站名称 SITE_TITLE: ChatGpt Web # mongodb 的连接字符串 MONGODB_URL: 'mongodb://chatgpt:xxxx@database:27017' # 网站是否开启注册 REGISTER_ENABLED: false # 开启注册之后 网站注册允许的邮箱后缀 如果空 则允许任意后缀 REGISTER_MAILS: '@qq.com,@sina.com,@163.com' # 开启注册之后 密码加密的盐 PASSWORD_MD5_SALT: anysalt # 开启注册之后 超级管理邮箱 ROOT_USER: xxx@qq.com # 开启注册之后 网站域名 不含 / 注册的时候发送验证邮箱使用 SITE_DOMAIN: http://127.0.0.1:1002 # 开启注册之后 发送验证邮箱配置 SMTP_HOST: smtp.exmail.qq.com SMTP_PORT: 465 SMTP_TSL: true SMTP_USERNAME: ${SMTP_USERNAME} SMTP_PASSWORD: ${SMTP_PASSWORD} # 是否开启敏感词审核, 因为响应结果是流式 所以暂时没审核 AUDIT_ENABLED: false # https://ai.baidu.com/ai-doc/ANTIPORN/Vk3h6xaga AUDIT_PROVIDER: baidu AUDIT_API_KEY: AUDIT_API_SECRET: AUDIT_TEXT_LABEL: links: - database database: image: mongo ports: - '27017:27017' expose: - '27017' volumes: - mongodb:/data/db environment: MONGO_INITDB_ROOT_USERNAME: chatgpt MONGO_INITDB_ROOT_PASSWORD: xxxx MONGO_INITDB_DATABASE: chatgpt mongo-gui: container_name: mongo-gui image: ugleiton/mongo-gui restart: always ports: - '4321:4321' environment: - MONGO_URL=mongodb://chatgpt:xxxx@database:27017 links: - database depends_on: - database nginx: image: nginx:alpine container_name: chatgptweb-database restart: unless-stopped ports: - '80:80' expose: - '80' volumes: - ./nginx/html:/usr/share/nginx/html - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf links: - app volumes: mongodb: {}