2018-10-04 13:42:34 +02:00
|
|
|
#!/bin/bash
|
2018-10-05 10:55:01 +02:00
|
|
|
containers=(
|
2018-10-05 11:52:19 +02:00
|
|
|
webmail_1
|
|
|
|
imap_1
|
|
|
|
smtp_1
|
|
|
|
antispam_1
|
|
|
|
admin_1
|
|
|
|
redis_1
|
|
|
|
antivirus_1
|
|
|
|
webdav_1
|
|
|
|
# fetchmail_1
|
|
|
|
front_1
|
2018-10-05 10:55:01 +02:00
|
|
|
)
|
|
|
|
|
2018-10-04 16:18:48 +02:00
|
|
|
containers_check() {
|
2018-10-04 16:51:17 +02:00
|
|
|
STATUS=0
|
2018-10-05 10:55:01 +02:00
|
|
|
for container in "${containers[@]}"; do
|
2018-10-05 11:52:19 +02:00
|
|
|
echo "Checking ${DOCKER_ORG}_${container}"
|
|
|
|
docker inspect "${DOCKER_ORG}_${container}" | grep '"Status": "running"' || STATUS=1
|
2018-10-04 16:18:48 +02:00
|
|
|
done
|
2018-10-04 16:51:17 +02:00
|
|
|
return $STATUS
|
2018-10-04 16:18:48 +02:00
|
|
|
}
|
|
|
|
|
2018-10-05 10:55:01 +02:00
|
|
|
container_logs() {
|
|
|
|
for container in "${containers[@]}"; do
|
2018-10-05 11:52:19 +02:00
|
|
|
echo "Showing logs for ${DOCKER_ORG}_${container}"
|
|
|
|
docker container logs "${DOCKER_ORG}_${container}"
|
2018-10-05 10:55:01 +02:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2018-10-04 14:19:40 +02:00
|
|
|
for file in tests/compose/*.env ; do
|
2018-10-04 13:42:34 +02:00
|
|
|
cp $file .env
|
2018-10-05 11:52:19 +02:00
|
|
|
docker-compose -f tests/compose/run.yml -p $DOCKER_ORG up -d
|
2018-10-04 16:18:48 +02:00
|
|
|
sleep 1m
|
2018-10-05 10:55:01 +02:00
|
|
|
docker ps
|
|
|
|
container_logs
|
2018-10-04 16:51:17 +02:00
|
|
|
containers_check || exit 1
|
2018-10-04 13:42:34 +02:00
|
|
|
done
|
2018-10-04 16:18:48 +02:00
|
|
|
|