fixed docker config

This commit is contained in:
agapple
2019-09-01 10:15:58 +08:00
parent c76e8ba0e4
commit 44187d9e3a
17 changed files with 535 additions and 49 deletions

View File

@@ -1,11 +1,23 @@
#!/bin/sh
metrics_port=`perl -le 'print $ENV{"canal.metrics.pull.port"}'`
if [ "$metrics_port" == "" ]; then
metrics_port="11112"
if [ -d "/home/admin/canal-server" ]; then
serverPort=`perl -le 'print $ENV{"server.port"}'`
if [ -z "$serverPort" ] ; then
serverPort=8089
fi
CHECK_URL="http://127.0.0.1:$serverPort/index.html"
CHECK_POINT="Canal"
else
metrics_port=`perl -le 'print $ENV{"canal.metrics.pull.port"}'`
if [ "$metrics_port" == "" ]; then
metrics_port="11112"
fi
CHECK_URL="http://127.0.0.1:$metrics_port/metrics"
CHECK_POINT="canal"
fi
CHECK_URL="http://127.0.0.1:$metrics_port/metrics"
CHECK_POINT="canal"
CHECK_COUNT=`curl -s --connect-timeout 7 --max-time 7 $CHECK_URL | grep -c $CHECK_POINT`
if [ $CHECK_COUNT -eq 0 ]; then
echo "[FAILED]"