ponysearch-docker/util.sh
Dalf 86f1f7e22d Mainly add searx/searx-checker
- Add searx/searx-checker image with automatic check everyday. Result https://${HOSTNAME}/status
- Cache /static files
- Add start.sh, stop.sh, update.sh
2019-07-09 18:05:05 +02:00

28 lines
649 B
Bash

BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
cd -- "$BASE_DIR"
set -e
DOCKERCOMPOSE=$(which docker-compose || echo "/usr/local/bin/docker-compose")
DOCKERCOMPOSEFILE="${DOCKERCOMPOSEFILE:-docker-compose.yaml}"
echo "use ${DOCKERCOMPOSEFILE}"
if [ ! -x "$(which docker)" ]; then
echo "docker not found" 1>&2
exit 1
fi
if ! docker version > /dev/null 2>&1; then
echo "can't execute docker (current user: $(whoami))" 1>&2
exit 1
fi
if [ ! -x "${DOCKERCOMPOSE}" ]; then
echo "docker-compose not found" 1>&2
exit 1
fi
if [ ! -f "${DOCKERCOMPOSEFILE}" ]; then
echo "${DOCKERCOMPOSEFILE} not found" 1>&2
exit 1
fi