Format and clean up the start.sh script for improved readability and consistency.
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Shell scripts: always LF so ./start.sh works on Linux/WSL
|
||||||
|
*.sh text eol=lf
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# 脚本所在目录为 docker/,项目根目录为其上级
|
# 脚本所在目录为 docker/,项目根目录为其上级
|
||||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
cd "$ROOT"
|
cd "$ROOT"
|
||||||
|
|
||||||
echo ">>> 项目根目录: $ROOT"
|
echo ">>> 项目根目录: $ROOT"
|
||||||
echo ">>> 构建并启动..."
|
echo ">>> 构建并启动..."
|
||||||
docker compose -f docker/docker-compose.yml build
|
docker compose -f docker/docker-compose.yml build
|
||||||
docker compose -f docker/docker-compose.yml up -d
|
docker compose -f docker/docker-compose.yml up -d
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">>> 已启动。访问: http://localhost:48080"
|
echo ">>> 已启动。访问: http://localhost:48080"
|
||||||
echo ">>> 查看日志: docker compose -f docker/docker-compose.yml logs -f"
|
echo ">>> 查看日志: docker compose -f docker/docker-compose.yml logs -f"
|
||||||
|
|||||||
Reference in New Issue
Block a user