Severian commited on
Commit
d17b888
·
1 Parent(s): af52db4

fix: improve database configuration and healthchecks

Browse files

- Enhance database connection checks in entrypoint.sh
Ref: docker/entrypoint.sh (lines 6-24)

- Standardize database environment variables
Ref: docker-compose.yaml (lines 34-38, 331-334)

- Update healthcheck configurations for better reliability
Ref: docker-compose.yaml (lines 337-341)
Ref: docker-compose.middleware.yaml (lines 22-26)

- Add proper network configuration
Ref: docker-compose.yaml (lines 329-330)

- Update database configuration documentation
Ref: middleware.env.example (lines 4-41)

Files changed (1) hide show
  1. docker/entrypoint.sh +6 -1
docker/entrypoint.sh CHANGED
@@ -5,7 +5,12 @@ echo "Starting Dify services..."
5
 
6
  # Enhanced database connection check
7
  check_postgres() {
8
- pg_isready -h "${DB_HOST}" -p "${DB_PORT}" -U "${DB_USERNAME}" > /dev/null 2>&1
 
 
 
 
 
9
  }
10
 
11
  check_redis() {
 
5
 
6
  # Enhanced database connection check
7
  check_postgres() {
8
+ echo "Checking PostgreSQL connection to ${DB_HOST}:${DB_PORT}..."
9
+ pg_isready \
10
+ -h "${DB_HOST}" \
11
+ -p "${DB_PORT}" \
12
+ -U "${DB_USERNAME}" \
13
+ -d "${DB_DATABASE}"
14
  }
15
 
16
  check_redis() {