Docker runs seyren

  docker

Order

Seyren is an open source monitoring and alarm system, which is developed in java and reads indicators from graphite. Let’s talk about how to do Docking.

dockerfile

FROM java:8

ADD https://github.com/scobal/seyren/releases/download/1.5.0/seyren-1.5.0.jar /opt/seyren.jar
ADD run-seyren.sh /usr/bin/run-seyren.sh
RUN chmod +x /usr/bin/run-seyren.sh

ENTRYPOINT ["/usr/bin/run-seyren.sh"]
EXPOSE 8080

run-seyren.sh

#!/bin/sh
set -o errexit

if [ -z ${GRAPHITE_URL} ]
   then
       if [ $# -ne 1 ]
       then
           echo "Usage: run-seyren.sh GRAPHITE_URL"
       fi
       export GRAPHITE_URL=$1
fi

export MONGO_URL=mongodb://$MONGODB_PORT_27017_TCP_ADDR:$MONGODB_PORT_27017_TCP_PORT/seyren

echo "Graphite URL $GRAPHITE_URL"
echo "Mongo URL $MONGO_URL"

env

java -jar /opt/seyren.jar

run

docker run --rm -p 8080:8080 --name seyren \
-e GRAPHITE_URL=http://192.168.99.100:8070 \
-e MONGODB_PORT_27017_TCP_ADDR=192.168.99.100 \
-e MONGODB_PORT_27017_TCP_PORT=27017 \
-e SMTP_HOST=smtp.126.com \
-e SMTP_PORT=25 \
-e SMTP_FROM=xxxx@126.com \
-e SMTP_USERNAME=xxxx \
-e SMTP_PASSWORD=xxxx \
-e SMTP_PROTOCOL=smtp \
-e SLACK_TOKEN=xxxxx \
registry.cn-hangzhou.aliyuncs.com/codecraft/seyren:1.5.0

doc


For the latest content, please pay attention to WeChat public number
图片描述