build: update shell files.

This commit is contained in:
liqiang-fit2cloud 2025-04-21 15:39:29 +08:00
parent 5e8dd48032
commit 8071d2dcd5
3 changed files with 11 additions and 10 deletions

View File

@ -3,11 +3,17 @@
set -e
if [ "$MAXKB_DB_HOST" = "127.0.0.1" ]; then
/usr/bin/start-postgres.sh
echo "PostgreSQL starting..."
/usr/bin/start-postgres.sh &
sleep 10
wait-for-it 127.0.0.1:5432 --timeout=120 --strict -- echo "PostgreSQL started."
fi
if [ "$MAXKB_REDIS_HOST" = "127.0.0.1" ]; then
/usr/bin/start-redis.sh
echo "Redis starting..."
/usr/bin/start-redis.sh &
sleep 5
wait-for-it 127.0.0.1:6379 --timeout=60 --strict -- echo "Redis started."
fi
/usr/bin/start-maxkb.sh

View File

@ -1,7 +1,4 @@
#!/bin/bash
mkdir -p /opt/maxkb/data/postgresql
echo "PostgreSQL starting..."
docker-entrypoint.sh postgres -c max_connections=${POSTGRES_MAX_CONNECTIONS} &
sleep 10
wait-for-it 127.0.0.1:5432 --timeout=120 --strict -- echo "PostgreSQL started."
docker-entrypoint.sh postgres -c max_connections=${POSTGRES_MAX_CONNECTIONS}

View File

@ -7,7 +7,5 @@ if [ ! -f /opt/maxkb/conf/redis.conf ]; then
touch /opt/maxkb/conf/redis.conf
printf "bind 0.0.0.0\nport 6379\ndatabases 16\nmaxmemory 1G\nmaxmemory-policy allkeys-lru\ndir /opt/maxkb/data/redis\nrequirepass "${REDIS_PASSWORD}"\n" > /opt/maxkb/conf/redis.conf
fi
echo "Redis starting..."
redis-server /opt/maxkb/conf/redis.conf &
sleep 5
wait-for-it 127.0.0.1:6379 --timeout=60 --strict -- echo "Redis started."
redis-server /opt/maxkb/conf/redis.conf