Skip to content

使用 Docker 启动服务,连不上数据库 Failed to connect to database #233

@second0188

Description

@second0188

是在 config/config.yaml 中,把 database 的 host 地址从 localhost 改成 pgvector,对吗?
试了改了,也试了没改,总是连不上数据库,导致 app-1 exited with code 1

app-1       | 2025-06-25T08:36:03.224Z [log] [db/index.ts:50] Connecting to PostgreSQL database: postgres://postgres:123456@pgvector:5433/postgres
app-1       | 2025-06-25T08:36:03.232Z [error] [db/index.ts:50] Failed to connect to database  { error=Failed query: select 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions