diff --git a/honeycomb-console/start.sh b/honeycomb-console/start.sh index 5d02ccd..176d381 100644 --- a/honeycomb-console/start.sh +++ b/honeycomb-console/start.sh @@ -8,7 +8,9 @@ if [ ! -d /home/admin/honeycomb ]; then fi # patch server_ctl -mv /tmp/server_ctl /home/admin/honeycomb/bin/server_ctl +if [ -f /tmp/server_ctl ]; then + mv /tmp/server_ctl /home/admin/honeycomb/bin/server_ctl +fi chown admin:admin -R /home/admin/honeycomb @@ -20,7 +22,8 @@ fi echo "starting honeycomb server..." su admin -c "/home/admin/honeycomb/bin/server_ctl start" - -cd /home/admin/apps && control publish ./honeycomb-console_$HONEYCOMB_VERSION.tgz +if ! ls /home/admin/honeycomb/run/appsRoot/honeycomb-console* > /dev/null 2>&1; then + cd /home/admin/apps && control publish ./honeycomb-console_$HONEYCOMB_VERSION.tgz +fi sleep inf diff --git a/honeycomb-server/Dockerfile b/honeycomb-server/Dockerfile index 26c1960..f7c08b1 100644 --- a/honeycomb-server/Dockerfile +++ b/honeycomb-server/Dockerfile @@ -10,7 +10,6 @@ RUN REPO_FILE=Centos-7.repo && \ if [ `arch` = 'aarch64' -o `arch` = 'arm64' ]; then REPO_FILE=Centos-altarch-7.repo; fi && \ curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/$REPO_FILE && \ sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo && \ - sed -i 's/mirrors.aliyun.com/mirrors.ustc.edu.cn/g' /etc/yum.repos.d/CentOS-Base.repo && \ yum update -y && \ yum install -y perl cronie make wget @@ -20,6 +19,18 @@ RUN REPO_FILE=Centos-7.repo && \ COPY honeycomb-server.rpm /tmp/honeycomb-server.rpm RUN rpm -i /tmp/honeycomb-server.rpm +# 升级 node 版本 +RUN wget -nv https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz && \ + tar xf node-v12.13.0-linux-x64.tar.xz && \ + mv node-v12.13.0-linux-x64 node && \ + rm -rf node-v12.13.0-linux-x64.tar.xz && \ + tar zxf /home/admin/honeycomb/target/honeycomb.tgz && \ + rm -rf honeycomb/node_modules/node && \ + mv node honeycomb/node_modules/node && \ + tar zcf honeycomb.tgz honeycomb && \ + mv honeycomb.tgz /home/admin/honeycomb/target/honeycomb.tgz && \ + chown admin:admin /home/admin/honeycomb/target/honeycomb.tgz + # set locale COPY lang.sh /etc/profile.d diff --git a/honeycomb-server/start.sh b/honeycomb-server/start.sh index 3509092..15d904b 100644 --- a/honeycomb-server/start.sh +++ b/honeycomb-server/start.sh @@ -3,6 +3,6 @@ set -e echo "starting honeycomb server..." -su admin && cd /home/admin/honeycomb/bin && server_ctl start +su admin -c "cd /home/admin/honeycomb/bin && ./server_ctl start" sleep inf