Use mongo from docker image

This commit is contained in:
Loïc Guitaut
2015-09-09 12:28:18 +02:00
parent ad3f4e9df1
commit 674d705250
2 changed files with 2 additions and 22 deletions

View File

@@ -8,10 +8,6 @@ if [[ ! -d $PLUGIN_DATA_ROOT ]]; then
dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugins-install" dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugins-install"
fi fi
if ! command -v mongo &>/dev/null; then
dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugins-install-dependencies"
fi
case "$1" in case "$1" in
$PLUGIN_COMMAND_PREFIX:alias) $PLUGIN_COMMAND_PREFIX:alias)
[[ -z $2 ]] && dokku_log_fail "Please specify a name for the service" [[ -z $2 ]] && dokku_log_fail "Please specify a name for the service"
@@ -150,10 +146,9 @@ case "$1" in
[[ -z $2 ]] && dokku_log_fail "Please specify a name for the service" [[ -z $2 ]] && dokku_log_fail "Please specify a name for the service"
verify_service_name "$2" verify_service_name "$2"
SERVICE="$2"; SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" SERVICE="$2"; SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
SERVICE_NAME="$(get_service_name "$SERVICE")"
ID=$(cat "$SERVICE_ROOT/ID") docker exec -it "$SERVICE_NAME" mongo "$SERVICE"
IP=$(get_container_ip "$ID")
mongo --host "$IP" --port 27017
;; ;;
$PLUGIN_COMMAND_PREFIX:info) $PLUGIN_COMMAND_PREFIX:info)

View File

@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname "$0")/config"
case "$DOKKU_DISTRO" in
ubuntu)
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes -qq -y mongodb-clients
;;
opensuse)
zypper -q in -y mongodb-clients
;;
esac