-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from docksal/develop
Release 1.5.1
- Loading branch information
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Allow using a different docker binary | ||
DOCKER ?= docker | ||
|
||
VERSION ?= dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# nginx config is valid | ||
nginx -t || exit 1 | ||
#set -x # Print commands | ||
set -e # Exit on errors | ||
|
||
# supervisor services are running | ||
if [[ -f /run/supervisord.pid ]]; then | ||
supervisorctl status docker-gen | grep RUNNING >/dev/null || exit 1 | ||
supervisorctl status nginx | grep RUNNING >/dev/null || exit 1 | ||
supervisorctl status crond | grep RUNNING >/dev/null || exit 1 | ||
# Check nginx config is valid | ||
echo "Checking nginx configuration..." | ||
nginx -t | ||
|
||
exit 0 | ||
fi | ||
# Check supervisor running | ||
echo "Checking supervisor..." | ||
# Need to do "|| exit 1" here since "set -e" apparently does not care about tests. | ||
[[ -f /run/supervisord.pid ]] || exit 1 | ||
|
||
exit 1 | ||
# Check supervisor controlled services | ||
# Since "supervisorctl status" is heavy and the healthcheck runs quit often, we use "ps" here | ||
echo "Checking supervisor services..." | ||
pslist=$(ps) | ||
echo ${pslist} | grep docker-gen >/dev/null | ||
echo ${pslist} | grep "nginx: master process" >/dev/null | ||
echo ${pslist} | grep "nginx: worker process" >/dev/null | ||
echo ${pslist} | grep crond >/dev/null |