You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
The "connection refused" error for the 'casdoor' service is likely due to the incorrect port configuration for the PostgreSQL service. In your Docker Compose file, the PostgreSQL service is exposed on port 5400, but the 'casdoor' service is trying to connect to it using the internal Docker network, which should use the default PostgreSQL port 5432.
To resolve this issue, update the dataSourceName in the 'casdoor' service's environment variables to use port 5432 instead of 5400:
This change ensures that 'casdoor' connects to the PostgreSQL service using the correct internal port. The external port 5400 is only used for accessing PostgreSQL from outside the Docker network.
📦 Environment
Docker
📌 Version
latest
💻 Operating System
Other Linux
🌐 Browser
Other
🐛 Bug Description
##这是yml文件
name: lobe-chat-database
services:
network-service:
image: alpine
container_name: lobe-network
ports:
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- '9001:9001' # MinIO Console
- '${CASDOOR_PORT}:8000' # Casdoor
- '${LOBE_PORT}:3210' # LobeChat
command: tail -f /dev/null
networks:
- lobe-network
postgresql:
image: pgvector/pgvector:pg16
container_name: lobe-postgres
ports:
- '5400:5432'
volumes:
- './data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_DB=${LOBE_DB_NAME}'
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 30s
timeout: 30s
retries: 5
restart: always
networks:
- lobe-network
minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
volumes:
- './s3_data:/etc/minio/data'
environment:
- 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
- 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.110.172:${LOBE_PORT}'
restart: always
command: >
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
casdoor:
image: casbin/casdoor
container_name: lobe-casdoor
entrypoint: /bin/sh -c './server --createDatabase=true'
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
environment:
RUNNING_IN_DOCKER: 'true'
driverName: 'postgres'
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5400 sslmode=disable dbname=casdoor'
origin: 'http://192.168.110.172:${CASDOOR_PORT}'
runmode: 'dev'
volumes:
- ./init_data.json:/init_data.json
lobe:
image: lobehub/lobe-chat-database
container_name: lobe-chat
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
network-service:
condition: service_started
minio:
condition: service_started
casdoor:
condition: service_started
volumes:
data:
driver: local
s3_data:
driver: local
networks:
lobe-network:
driver: bridge
##这是.env文件
Proxy, if you need it
HTTP_PROXY=http://localhost:7890
HTTPS_PROXY=http://localhost:7890
Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
OPENAI_API_KEY=sk-xxxx
OPENAI_PROXY_URL=https://api.openai.com/v1
OPENAI_MODEL_LIST=...
===========================
====== Preset config ======
===========================
if no special requirements, no need to change
LOBE_PORT=3210
CASDOOR_PORT=8011
MINIO_PORT=9000
Postgres related, which are the necessary environment variables for DB
LOBE_DB_NAME=lobechat
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
Casdoor secret
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
AUTH_CASDOOR_SECRET=e1e7e9efd1ddf448ea5f742aa1f09c3d
MinIO S3 configuration
MINIO_ROOT_USER=YOUR_MINIO_USER
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
Configure the bucket information of MinIO
MINIO_LOBE_BUCKET=lobe
S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng
S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO
📷 Recurrence Steps
##lobe-casdoor这是报错信息
panic: dial tcp 192.168.48.3:5400: connect: connection refused
goroutine 1 [running]:
github.com/casdoor/casdoor/object.InitAdapter()
main.main()
🚦 Expected Behavior
No response
📝 Additional Information
No response
The text was updated successfully, but these errors were encountered: