From f89e18578f91a69ec189f98f060243e11950321b Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Fri, 18 Apr 2025 15:42:59 +0800 Subject: [PATCH] build: init directory. --- installer/start-all.sh | 5 ----- installer/start-postgres.sh | 4 ++-- installer/start-redis.sh | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/installer/start-all.sh b/installer/start-all.sh index 4f8b494ad..a2af53fa5 100644 --- a/installer/start-all.sh +++ b/installer/start-all.sh @@ -1,16 +1,11 @@ #!/bin/bash if [ "$MAXKB_DB_HOST" = "127.0.0.1" ]; then - echo "PostgreSQL starting..." /usr/bin/start-postgres.sh - echo "PostgreSQL started." fi - if [ "$MAXKB_REDIS_HOST" = "127.0.0.1" ]; then - echo "Redis starting..." /usr/bin/start-redis.sh - echo "Redis started." fi /usr/bin/start-maxkb.sh \ No newline at end of file diff --git a/installer/start-postgres.sh b/installer/start-postgres.sh index 9d27071f1..a9a08e4b1 100644 --- a/installer/start-postgres.sh +++ b/installer/start-postgres.sh @@ -1,7 +1,7 @@ #!/bin/bash mkdir -p /opt/maxkb/data/postgresql - +echo "PostgreSQL starting..." docker-entrypoint.sh postgres -c max_connections=${POSTGRES_MAX_CONNECTIONS} & sleep 10 -/usr/bin/wait-for-it.sh 127.0.0.1:5432 --timeout=120 --strict \ No newline at end of file +/usr/bin/wait-for-it.sh 127.0.0.1:5432 --timeout=120 --strict -- echo "PostgreSQL started." \ No newline at end of file diff --git a/installer/start-redis.sh b/installer/start-redis.sh index 040040880..fd0fa6e5f 100644 --- a/installer/start-redis.sh +++ b/installer/start-redis.sh @@ -7,7 +7,7 @@ if [ ! -f /opt/maxkb/conf/redis.conf ]; then touch /opt/maxkb/conf/redis.conf printf "bind 0.0.0.0\nport 6379\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 -/usr/bin/wait-for-it.sh 127.0.0.1:6379 --timeout=60 --strict \ No newline at end of file +/usr/bin/wait-for-it.sh 127.0.0.1:6379 --timeout=60 --strict -- echo "Redis started." \ No newline at end of file