Browse Source

add alpine

master
zeus 4 years ago
parent
commit
af6dfbcc1e
  1. 6
      install.sh
  2. 5
      llo/connect-new.js
  3. 1
      package.json
  4. 48
      stop

6
install.sh

@ -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

5
llo/connect-new.js

@ -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
package.json

@ -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",

48
stop

@ -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