forked from monitoringartist/dockbix-xxl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
32 lines (30 loc) · 1.53 KB
/
circle.yml
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
machine:
services:
- docker
environment:
DB_USER: db-user
DB_PASS: db-password
dependencies:
pre:
- docker pull million12/mariadb
post:
# Launch DB backend
- docker run -d --name=db --env="MARIADB_USER=$DB_USER" --env="MARIADB_PASS=$DB_PASS" million12/mariadb
- docker logs -f db | tee -a ${CIRCLE_ARTIFACTS}/db.log:
background: true
- docker build -t million12/zabbix-server-base:test Dockerfile/zabbix-server-2.4/.
test:
override:
- while true; do if grep "You can now connect to this MariaDB Server" -a ${CIRCLE_ARTIFACTS}/db.log; then break; else sleep 1; fi done
- docker run -d --name zabbix --link db:zabbix.db -p 80:80 -p 10051:10051 --env="ZS_DBHost=zabbix.db" --env="ZS_DBUser=$DB_USER" --env="ZS_DBPassword=$DB_PASS" million12/zabbix-server-base:test
- docker logs -f zabbix | tee -a ${CIRCLE_ARTIFACTS}/zabbix.log:
background: true
- while true; do if grep "nginx entered RUNNING state" -a ${CIRCLE_ARTIFACTS}/zabbix.log; then break; else sleep 1; fi done
# Check Zabbix Web interface status
- curl -s -L --head http://127.0.0.1/ | grep "HTTP/1.1 200 OK"
# Check if after restartting docker image server works.
- docker restart zabbix
- docker logs -f zabbix | tee -a ${CIRCLE_ARTIFACTS}/zabbix-after-restart.log:
background: true
- while true; do if grep "nginx entered RUNNING state" -a ${CIRCLE_ARTIFACTS}/zabbix-after-restart.log; then break; else sleep 1; fi done
- curl -s -L --head http://127.0.0.1/ | grep "HTTP/1.1 200 OK"