From 068cf9c526cbc61a5d232ef82b4f66e70eb42feb Mon Sep 17 00:00:00 2001 From: yangshaoxue Date: Thu, 23 Jun 2022 14:44:23 +0800 Subject: [PATCH] Add skyline port settings 1. skyline port can be set when skyline container starts 2. update readme Change-Id: Ic7f81e3d753c041fd5ea89268855d4b68086807d --- README-zh_CN.md | 12 ++++++++++++ README.md | 12 ++++++++++++ container/start_service.sh | 7 ++++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/README-zh_CN.md b/README-zh_CN.md index 47c44f0..0521f74 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -69,7 +69,13 @@ Skyline 的吉祥物是九色鹿。九色鹿源自于敦煌壁画《九色鹿本 ```bash docker rm -f skyline_bootstrap + ``` + > 如果需要修改 skyline 端口号,则在以下命令中添加 `-e LISTEN_ADDRESS=` + > + > `LISTEN_ADDRESS` 默认为 `0.0.0.0:9999` + + ```bash docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest ``` @@ -133,7 +139,13 @@ Skyline 的吉祥物是九色鹿。九色鹿源自于敦煌壁画《九色鹿本 ```bash docker rm -f skyline_bootstrap + ``` + > 如果需要修改 skyline 端口号,则在以下命令中添加 `-e LISTEN_ADDRESS=` + > + > `LISTEN_ADDRESS` 默认为 `0.0.0.0:9999` + + ```bash docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest ``` diff --git a/README.md b/README.md index 78415c2..6b7910e 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,13 @@ Skyline's mascot is the nine-color deer. The nine-color deer comes from Dunhuang ```bash docker rm -f skyline_bootstrap + ``` + > If you need to modify skyline port, add `-e LISTEN_ADDRESS=` in the following command + > + > `LISTEN_ADDRESS` defaults to `0.0.0.0:9999` + + ```bash docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml -v /tmp/skyline:/tmp --net=host 99cloud/skyline:latest ``` @@ -133,7 +139,13 @@ Skyline's mascot is the nine-color deer. The nine-color deer comes from Dunhuang ```bash docker rm -f skyline_bootstrap + ``` + > If you need to modify skyline port, add `-e LISTEN_ADDRESS=` in the following command + > + > `LISTEN_ADDRESS` defaults to `0.0.0.0:9999` + + ```bash docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest ``` diff --git a/container/start_service.sh b/container/start_service.sh index b21bab4..224b192 100755 --- a/container/start_service.sh +++ b/container/start_service.sh @@ -13,7 +13,12 @@ if [[ "${!KOLLA_BOOTSTRAP[*]}" ]]; then exit 0 fi -skyline-nginx-generator -o /etc/nginx/nginx.conf +if [[ -n "${LISTEN_ADDRESS}" ]]; then + skyline-nginx-generator -o /etc/nginx/nginx.conf --listen-address "${LISTEN_ADDRESS}" +else + skyline-nginx-generator -o /etc/nginx/nginx.conf +fi + nginx echo "Running command: ${CMD[*]}"