build: init directory.
This commit is contained in:
parent
32111f6a8f
commit
f89e18578f
@ -1,16 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$MAXKB_DB_HOST" = "127.0.0.1" ]; then
|
if [ "$MAXKB_DB_HOST" = "127.0.0.1" ]; then
|
||||||
echo "PostgreSQL starting..."
|
|
||||||
/usr/bin/start-postgres.sh
|
/usr/bin/start-postgres.sh
|
||||||
echo "PostgreSQL started."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$MAXKB_REDIS_HOST" = "127.0.0.1" ]; then
|
if [ "$MAXKB_REDIS_HOST" = "127.0.0.1" ]; then
|
||||||
echo "Redis starting..."
|
|
||||||
/usr/bin/start-redis.sh
|
/usr/bin/start-redis.sh
|
||||||
echo "Redis started."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/bin/start-maxkb.sh
|
/usr/bin/start-maxkb.sh
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
mkdir -p /opt/maxkb/data/postgresql
|
mkdir -p /opt/maxkb/data/postgresql
|
||||||
|
echo "PostgreSQL starting..."
|
||||||
docker-entrypoint.sh postgres -c max_connections=${POSTGRES_MAX_CONNECTIONS} &
|
docker-entrypoint.sh postgres -c max_connections=${POSTGRES_MAX_CONNECTIONS} &
|
||||||
sleep 10
|
sleep 10
|
||||||
/usr/bin/wait-for-it.sh 127.0.0.1:5432 --timeout=120 --strict
|
/usr/bin/wait-for-it.sh 127.0.0.1:5432 --timeout=120 --strict -- echo "PostgreSQL started."
|
||||||
@ -7,7 +7,7 @@ if [ ! -f /opt/maxkb/conf/redis.conf ]; then
|
|||||||
touch /opt/maxkb/conf/redis.conf
|
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
|
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
|
fi
|
||||||
|
echo "Redis starting..."
|
||||||
redis-server /opt/maxkb/conf/redis.conf &
|
redis-server /opt/maxkb/conf/redis.conf &
|
||||||
sleep 5
|
sleep 5
|
||||||
/usr/bin/wait-for-it.sh 127.0.0.1:6379 --timeout=60 --strict
|
/usr/bin/wait-for-it.sh 127.0.0.1:6379 --timeout=60 --strict -- echo "Redis started."
|
||||||
Loading…
Reference in New Issue
Block a user