Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(portal): fix SC2045-ShellCheck #14

Open
wants to merge 4 commits into
base: v0.2.2-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(demo): make demo shell scripts compatible with Mac and Linux
  • Loading branch information
Houlong66 committed Aug 18, 2022
commit aca4e2f61c08c7a966d9df3e763f51b61ba46cbd
6 changes: 5 additions & 1 deletion appactive-demo/quit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
# limitations under the License.
#

docker-compose down
if [[ -z $1 ]]; then
docker-compose down
else
docker-compose -f "$1" down
fi
10 changes: 5 additions & 5 deletions appactive-demo/run-nacos-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

export appactiveNamespaceId="appactiveDemoNamespaceId"
docker-compose -f docker-compose-nacos-quick.yml up -d nacos mysql
sleep 40s
sleep 40

curl -X POST 'http:https://127.0.0.1:8848/nacos/v1/console/namespaces' -d 'customNamespaceId=appactiveDemoNamespaceId&namespaceName=appactiveDemoNamespaceName&namespaceDesc=appactiveDemoNamespaceDesc'

Expand All @@ -25,14 +25,14 @@ sh baseline.sh 2 NACOS appactiveDemoNamespaceId

cd ../appactive-demo
docker-compose -f docker-compose-nacos-quick.yml up -d storage storage-unit
sleep 15s
sleep 15
docker-compose -f docker-compose-nacos-quick.yml up -d product product-unit
sleep 15s
sleep 15
docker-compose -f docker-compose-nacos-quick.yml up -d frontend frontend-unit
sleep 3s
sleep 3
docker-compose -f docker-compose-nacos-quick.yml up -d gateway

sleep 3s
sleep 3
cd ../appactive-portal
sh baseline.sh 3

Expand Down
6 changes: 3 additions & 3 deletions appactive-demo/run-nacos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ then
export appactiveNamespaceId="${temp}"
docker-compose -f docker-compose-nacos.yml build
docker-compose -f docker-compose-nacos.yml up -d storage storage-unit
sleep 15s
sleep 15
docker-compose -f docker-compose-nacos.yml up -d product product-unit
sleep 15s
sleep 15
docker-compose -f docker-compose-nacos.yml up -d frontend frontend-unit
sleep 3s
sleep 3
docker-compose -f docker-compose-nacos.yml up -d gateway
fi

Expand Down
10 changes: 5 additions & 5 deletions appactive-demo/run-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ sh baseline.sh 2

cd ../appactive-demo
docker-compose -f docker-compose-quick.yml up -d nacos mysql
sleep 20s
sleep 20
docker-compose -f docker-compose-quick.yml up -d storage storage-unit
sleep 15s
sleep 15
docker-compose -f docker-compose-quick.yml up -d product product-unit
sleep 15s
sleep 15
docker-compose -f docker-compose-quick.yml up -d frontend frontend-unit
sleep 3s
sleep 3
docker-compose -f docker-compose-quick.yml up -d gateway

sleep 3s
sleep 3
cd ../appactive-portal
sh baseline.sh 3

Expand Down
8 changes: 4 additions & 4 deletions appactive-demo/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

docker-compose build
docker-compose up -d nacos mysql
sleep 20s
sleep 20
docker-compose up -d storage storage-unit
sleep 15s
sleep 15
docker-compose up -d product product-unit
sleep 15s
sleep 15
docker-compose up -d frontend frontend-unit
sleep 3s
sleep 3
docker-compose up -d gateway

# docker-compose up --no-recreate
Expand Down
2 changes: 1 addition & 1 deletion appactive-portal/cut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ echo "$(date "+%Y-%m-%d %H:%M:%S") gateway 新规则推送结果: " && curl --he
127.0.0.1:8090/set

echo "等待数据追平......"
sleep "${waitTime}s"
sleep "${waitTime}"
echo "数据已经追平,下发新规则......"

if [ $channel = "FILE" ]
Expand Down
2 changes: 1 addition & 1 deletion docs/cn/details/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ nav_order: 7
2. 绑定本地 host: `127.0.0.1 demo.appactive.io`,浏览器访问 `http:https://demo.appactive.io/buyProduct?r_id=2000` 查看效果
3. 在`appactive-portal` 模块中运行 `sh cut.sh` 进行切流 。需要注意的是,本 demo 的禁写规则是写死的,用户若要更换切流范围则需自行计算禁写规则和下次路由规则,然后执行切流。

> 如果你打算停止体验,可进行:`cd appactive-demo` -> `docker-compose down`
> 如果你打算停止体验,可进行:`cd appactive-demo` -> `sh quit.sh`

## 源码构建

Expand Down
2 changes: 1 addition & 1 deletion docs/cn/details/demo_nacos.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ nav_order: 3
2. 绑定本地 host: `127.0.0.1 demo.appactive.io`,浏览器访问 `http:https://demo.appactive.io/buyProduct?r_id=2000` 查看效果
3. 在`appactive-portal` 模块中运行 `sh cut.sh NACOS appactiveDemoNamespaceId` 进行切流 。需要注意的是,本 demo 的禁写规则是写死的,用户若要更换切流范围则需自行计算禁写规则和下次路由规则,然后执行切流。

> 如果你打算停止体验,可进行:`cd appactive-demo` -> `sh quit.sh`
> 如果你打算停止体验,可进行:`cd appactive-demo` -> `sh quit.sh ./docker-compose-nacos-quick.yml`

若想直接体验,请见[官方demo站点](http:https://demo.appactive.io/)

Expand Down