labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.51k stars 4.7k forks source link

新建知识库报错“getaddrinfo ENOTFOUND pg” #129

Closed dengchangdong closed 1 year ago

dengchangdong commented 1 year ago

对话和创建应用正常,但是创建知识库是报错:getaddrinfo ENOTFOUND pg

docker-compose.yml 文件内容如下:

version: '3.7'
services:
  pg:
    image: ankane/pgvector:v0.4.2
    container_name: PostgreDB
    restart: always
    networks:
      - fastgpt
    environment:
      - POSTGRES_USER=xxx
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=xxx
    volumes:
      - /home/data/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
      - /home/data/pg/data:/var/lib/postgresql/data

  mongo:
    image: mongo:5.0.18
    container_name: MongoDB
    restart: always
    networks:
      - fastgpt
    environment:
      - MONGO_INITDB_ROOT_USERNAME=xxx
      - MONGO_INITDB_ROOT_PASSWORD=password
    volumes:
      - /home/data/mongo/data:/data/db
      - /home/logs/mongo:/var/log/mongodb

  fastgpt:
    container_name: fastgpt
    image: c121914yu/fast-gpt:latest
    ports:
      - 3000:3000
    networks:
      - fastgpt
    depends_on:
      - mongo
      - pg
    restart: always
    environment:
      - PORT=3000
      - DB_MAX_LINK=5
      - MY_MAIL=xxx@qq.com
      - MAILE_CODE=xxx
      - TOKEN_KEY=tk-abcdefg0123456789
      - ROOT_KEY=rk-abcdefg0123456789
      - MONGODB_URI=mongodb://xxx:password@mongo:27017/?authSource=admin
      - MONGODB_NAME=xxx
      - PG_HOST=pg
      - PG_PORT=5432
      - PG_USER=xxx
      - PG_PASSWORD=password
      - PG_DB_NAME=xxx
      - OPENAIKEY=sk-
      - OPENAI_BASE_URL=https://domain/api/v1
      - OPENAI_BASE_URL_AUTH=

  fastgpt-admin:
    image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-admin:latest
    container_name: fastgptAdmin
    restart: always
    ports:
      - 3001:3001
    networks:
      - fastgpt
    depends_on:
      - mongo
      - fastgpt
    environment:
      - MONGODB_URI=mongodb://xxx:password@mongo:27017/?authSource=admin
      - MONGODB_NAME=xxx
      - ADMIN_USER=xxx
      - ADMIN_PASS=xxx
      - ADMIN_SECRET=ak--abcdefg0123456789
      - PARENT_URL=http://fastgpt:3000
      - PARENT_ROOT_KEY=rk-abcdefg0123456789

networks:
  fastgpt:

请问是哪里配置错误吗?谢谢!

dengchangdong commented 1 year ago

已解决。增加privileged: true

qcoltma commented 8 months ago

privileged: true

你好,我也有相同问题,请问这一条具体加在配置文件的哪个地方?谢谢。

c121914yu commented 8 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


privileged: true

Hello, I also have the same problem. Where should I add this line in the configuration file? Thanks.