Use our own image to wait for services

This commit is contained in:
Loïc Guitaut
2015-09-24 11:07:05 +02:00
parent 7905c134e5
commit 34fd421d4c
2 changed files with 3 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ case "$1" in
echo "$ID" > "$SERVICE_ROOT/ID"
dokku_log_verbose_quiet "Waiting for container to be ready"
docker run --rm --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" aanand/wait > /dev/null
docker run --rm --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" dokkupaas/wait > /dev/null
echo "db.createUser({user:'admin',pwd:'$rootpassword',roles:[{role:'userAdminAnyDatabase',db:'admin'}]})" | docker exec -i "$SERVICE_NAME" mongo admin > /dev/null
echo "db.createUser({user:'$SERVICE',pwd:'$password',roles:[{role:'readWrite',db:'$SERVICE'}]})" | docker exec -i "$SERVICE_NAME" mongo -u admin -p "$rootpassword" --authenticationDatabase admin "$SERVICE" > /dev/null

View File

@@ -10,8 +10,8 @@ if ! docker images | grep -e "^svendowideit/ambassador "; then
docker pull svendowideit/ambassador:latest
fi
if ! docker images | grep -e "^aanand/wait "; then
docker pull aanand/wait:latest
if ! docker images | grep -e "^dokkupaas/wait "; then
docker pull dokkupaas/wait:latest
fi
mkdir -p "$PLUGIN_DATA_ROOT" || echo "Failed to create $PLUGIN_SERVICE directory"