mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 18:45:58 +08:00
feat: ver3 branch
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
This commit is contained in:
+7
-41
@@ -1,43 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This scripts is used to check the environment and start the docker containers
|
||||
|
||||
# Define the directory path
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Define the functions
|
||||
function check_command {
|
||||
if ! command -v $1 &> /dev/null; then
|
||||
echo "$1 command not found. Please install it first."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_docker {
|
||||
if ! docker ps &> /dev/null; then
|
||||
echo "Docker is not running. Please start it first."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if the necessary commands are installed
|
||||
check_command docker
|
||||
check_command docker-compose
|
||||
|
||||
# Check if Docker is running
|
||||
check_docker
|
||||
|
||||
# Change to the scripts directory
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
# Set permissions for the scripts
|
||||
chmod +x *.sh
|
||||
|
||||
# Check the environment
|
||||
./env_check.sh
|
||||
|
||||
# Start the docker containers
|
||||
docker-compose up -d
|
||||
|
||||
# Check the docker services
|
||||
./docker_check_service.sh
|
||||
cd script ;
|
||||
chmod +x *.sh ;
|
||||
./env_check.sh;
|
||||
cd .. ;
|
||||
docker-compose up -d;
|
||||
cd script ;
|
||||
./docker_check_service.sh
|
||||
|
||||
Reference in New Issue
Block a user