Browse Source

add alpine

master
zeus 1 month ago
parent
commit
af6dfbcc1e
4 changed files with 54 additions and 6 deletions
  1. +3
    -3
      install.sh
  2. +3
    -2
      llo/connect-new.js
  3. +1
    -0
      package.json
  4. +47
    -1
      stop

+ 3
- 3
install.sh View File

@@ -153,7 +153,7 @@ then
exit
else
dockercomposeversion=$(docker-compose -f $wdir/test/run.yml config --services)
if [ $dockercomposeversion != 'swarmlabclient' ];then
if [ "$dockercomposeversion" != 'swarmlabclient' ];then
echo ""
echo "Cannot find docker-compose"
echo "Install it and try again!"
@@ -211,7 +211,7 @@ if [ $toolsok == 'ok' ];then
cd $wdir
fi

if [ $toolsok == 'ok' ];then
if [ "$toolsok" == 'ok' ];then
#cp -f $wdir/files/VuetableCssConfig.js $wdir/node_modules/vuetable-2/src/components/VuetableCssConfig.js
#cp -f $wdir/files/serve.js $wdir/node_modules/@vue/cli-service/lib/commands/serve.js
cp -f $wdir/files/status.sh $wdir/hybrid/connect/status.sh
@@ -251,7 +251,7 @@ fi

sudo bash ./hybrid/connect/get-base-ca
sudo bash ./hybrid/connect/get-swarmlab-ca
docker pull hub.swarmlab.io:5480/venusclient:latest
docker pull hub.swarmlab.io:5480/venus-alpine:latest


#echo $nodeversion

+ 3
- 2
llo/connect-new.js View File

@@ -194,9 +194,10 @@ docker run -d \
-v ${mypath}/hybrid/connect:/settingsclient \
-v /lib/modules:/lib/modules \
--restart unless-stopped \
hub.swarmlab.io:5480/venusclient:latest
docker exec -it swarmlabwg /bin/bash -c "pm2-runtime start /app/swarmlab-venus/client_ecosystem.config.js"
hub.swarmlab.io:5480/venus-alpine:latest
`
//docker exec -it swarmlabwg /bin/bash -c "pm2-runtime start /app/swarmlab-venus/client_ecosystem.config.js"
//hub.swarmlab.io:5480/venusclient:latest
fs.writeFileSync('./hybrid/connect/swarmlabwg', myExec);
fs.writeFileSync('./hybrid/connect/swarmlabstatus', 'wgstatusclient=off');


+ 1
- 0
package.json View File

@@ -9,6 +9,7 @@
"dependencies": {
"async": "^3.2.0",
"bufferutil": "^4.0.2",
"cors": "^2.8.5",
"express": "^4.17.1",
"helmet": "^4.1.1",
"pm2": "^4.5.1",

+ 47
- 1
stop View File

@@ -1,4 +1,50 @@
#!/bin/bash

pm2 stop venusclient
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
TARGET="$(readlink "$SOURCE")"
if [[ $TARGET == /* ]]; then
#echo "SOURCE '$SOURCE' is an absolute symlink to '$TARGET'"
SOURCE="$TARGET"
else
DIR="$( dirname "$SOURCE" )"
#echo "SOURCE '$SOURCE' is a relative symlink to '$TARGET' (relative to '$DIR')"
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
fi
done

SRPATH="$( dirname "$SOURCE" )"
SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ "$SFPATH" != "$SRPATH" ]; then
RDIR=$SRPATH # relativ path directory
fi

cwdir=$PWD
wdir=$SFPATH

if [ "$cwdir" != "$wdir" ]; then
cd $wdir
fi

pm2 stop venusclient > /dev/null 2>&1
sleep 1
pm2 status


txturl='\033[1;36m'
txturl1='\033[0;36m'
txtg='\033[0;32m'
NOCOLOR='\033[0m'

echo -e "$(
cat << EOM

${txtg} DONE ${NOCOLOR}

${NOCOLOR}

EOM
)"




Loading…
Cancel
Save