From 669dc110645cd98bd65cacd4faa3633c6c0b05b3 Mon Sep 17 00:00:00 2001 From: liumangmang Date: Wed, 4 Feb 2026 11:30:55 +0800 Subject: [PATCH] Format and clean up the start.sh script for improved readability and consistency. --- .gitattributes | 2 ++ docker/start.sh | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..abe6685 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Shell scripts: always LF so ./start.sh works on Linux/WSL +*.sh text eol=lf diff --git a/docker/start.sh b/docker/start.sh index fd32b29..7e1b882 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,15 +1,15 @@ -#!/usr/bin/env bash -set -e - -# 脚本所在目录为 docker/,项目根目录为其上级 -ROOT="$(cd "$(dirname "$0")/.." && pwd)" -cd "$ROOT" - -echo ">>> 项目根目录: $ROOT" -echo ">>> 构建并启动..." -docker compose -f docker/docker-compose.yml build -docker compose -f docker/docker-compose.yml up -d - -echo "" -echo ">>> 已启动。访问: http://localhost:48080" -echo ">>> 查看日志: docker compose -f docker/docker-compose.yml logs -f" +#!/usr/bin/env bash +set -e + +# 脚本所在目录为 docker/,项目根目录为其上级 +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +cd "$ROOT" + +echo ">>> 项目根目录: $ROOT" +echo ">>> 构建并启动..." +docker compose -f docker/docker-compose.yml build +docker compose -f docker/docker-compose.yml up -d + +echo "" +echo ">>> 已启动。访问: http://localhost:48080" +echo ">>> 查看日志: docker compose -f docker/docker-compose.yml logs -f"