Skip to content

Commit 8071d2d

Browse files
build: update shell files.
1 parent 5e8dd48 commit 8071d2d

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

installer/start-all.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
set -e
44

55
if [ "$MAXKB_DB_HOST" = "127.0.0.1" ]; then
6-
/usr/bin/start-postgres.sh
6+
echo "PostgreSQL starting..."
7+
/usr/bin/start-postgres.sh &
8+
sleep 10
9+
wait-for-it 127.0.0.1:5432 --timeout=120 --strict -- echo "PostgreSQL started."
710
fi
811

912
if [ "$MAXKB_REDIS_HOST" = "127.0.0.1" ]; then
10-
/usr/bin/start-redis.sh
13+
echo "Redis starting..."
14+
/usr/bin/start-redis.sh &
15+
sleep 5
16+
wait-for-it 127.0.0.1:6379 --timeout=60 --strict -- echo "Redis started."
1117
fi
1218

1319
/usr/bin/start-maxkb.sh

installer/start-postgres.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/bash
22

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

installer/start-redis.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ if [ ! -f /opt/maxkb/conf/redis.conf ]; then
77
touch /opt/maxkb/conf/redis.conf
88
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
99
fi
10-
echo "Redis starting..."
11-
redis-server /opt/maxkb/conf/redis.conf &
12-
sleep 5
13-
wait-for-it 127.0.0.1:6379 --timeout=60 --strict -- echo "Redis started."
10+
11+
redis-server /opt/maxkb/conf/redis.conf

0 commit comments

Comments
 (0)