2024-09-22 20:42:23 +08:00
|
|
|
|
#!/bin/bash
|
2024-11-18 23:12:52 +08:00
|
|
|
|
declare install_path=$1
|
|
|
|
|
declare service_port=$2
|
|
|
|
|
cd $install_path
|
2024-09-22 20:42:23 +08:00
|
|
|
|
|
2024-11-18 23:12:52 +08:00
|
|
|
|
declare project_name=$(basename $install_path)
|
2024-09-22 20:42:23 +08:00
|
|
|
|
cd ..
|
2024-11-18 23:12:52 +08:00
|
|
|
|
rm -rf "$project_name"
|
2024-09-22 20:42:23 +08:00
|
|
|
|
|
2024-11-18 23:12:52 +08:00
|
|
|
|
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard
|
2024-09-22 21:07:50 +08:00
|
|
|
|
|
2024-11-18 23:12:52 +08:00
|
|
|
|
if [[ "$project_name" != Xboard ]];then
|
|
|
|
|
mv Xboard "$project_name"
|
2024-09-22 21:07:50 +08:00
|
|
|
|
fi
|
|
|
|
|
|
2024-11-18 23:12:52 +08:00
|
|
|
|
cd "$install_path"
|
2024-09-22 20:42:23 +08:00
|
|
|
|
|
|
|
|
|
docker compose run -it --rm xboard php artisan xboard:install
|
|
|
|
|
|
|
|
|
|
docker compose up -d > /dev/null
|
|
|
|
|
|
|
|
|
|
sleep 5
|
|
|
|
|
echo "网站端口默认7001,记得防火墙放行"
|