-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.run.test.sh
executable file
·63 lines (52 loc) · 1.65 KB
/
.run.test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
#
CON_NAME=prosody_1
IMG_VER=0.9_hg
IMG_BASE_NAME="trurlmcbyte/prosody"
IMG_NAME="$IMG_BASE_NAME:$IMG_VER"
test -f ./build.log && mv -b ./build.log ./build.log.old
docker build -t $IMG_NAME . &> ./build.log || exit 1
exit
#docker pull $IMG_NAME
docker stop -t 2 $CON_NAME
docker rm $CON_NAME
#etcdctl rm /skydns/net/mcbyte/home/vjud
#etcdctl rm /skydns/net/mcbyte/home/jud
#etcdctl rm /skydns/net/mcbyte/home/users
#etcdctl set /skydns/net/mcbyte/home/vjud '{"host":"prosody.home.mcbyte.net."}'
#etcdctl set /skydns/net/mcbyte/home/jud '{"host":"prosody.home.mcbyte.net."}'
#etcdctl set /skydns/net/mcbyte/home/users '{"host":"prosody.home.mcbyte.net."}'
# -h $CON_NAME.$HOST \
docker run -d --restart=always --name $CON_NAME \
--log-opt max-size=5m \
-p 5222:5222 \
-l port.5222=xmpp-c2s \
-p 5280:5280 \
-l port.5280=xmpp-bosh \
-p 5281:5281 \
-l port.5281=xmpp-sbosh \
-p 5347:5347 \
-l port.5347=xmpp-component \
-p 5269:5269 \
-l port.5269=xmpp-server \
-p 5002:5002 \
-l port.5347=xmpp-proxy65 \
-e TZ=Asia/Jerusalem \
-v /srv/docker/prosody/etc:/etc/prosody:ro \
-v /srv/docker/prosody/lib:/var/lib/prosody:rw \
$IMG_NAME
# --log-driver=syslog \
# --log-opt syslog-address=udp://192.168.1.11:514 \
# --log-opt syslog-facility=daemon \
# --log-opt tag="$CON_NAME" \
#sleep 3s
#tail /var/log/messages
#docker export -o $CON_NAME.tar $CON_NAME
if curl -s http://home.mcbyte.net:5280/http-bind | grep -q "It works" ; then
echo "Build $IMG_NAME is OK"
# docker tag $IMG_NAME $IMG_BASE_NAME:latest
# docker push $IMG_BASE_NAME
fi
echo -en "\007"
sleep 1s
echo -en "\007"