Open
Description
When trying to connect to PostgreSQL cloud, encountering authentication error:
[error] failed to initialize database, got error failed to connect to
`host=xxxxx user=xxxxx database=postgres`: server error
(FATAL: no pg_hba.conf entry for host "xxxxxx", user "xxxxx", database "postgres", no encryption (SQLSTATE 28000))
Configuration
environment configuration in dify-plugin.yaml:
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: postgres-credentials
key: pg-username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-credentials
key: pg-password
- name: DB_HOST
valueFrom:
secretKeyRef:
name: postgres-credentials
key: pg-host
- name: DB_PORT
valueFrom:
secretKeyRef:
name: postgres-credentials
key: pg-port
- name: DB_DATABASE
value: dify-plugin
- name: SQLALCHEMY_POOL_SIZE
value: '20'
- name: DB_PLUGIN_DATABASE
value: dify-plugin
i find a hardcoded 'postgres' database name here: https://github.com/langgenius/dify-plugin-daemon/blob/main/internal/db/init.go
Metadata
Assignees
Labels
No labels
Activity