Skip to content

Commit

Permalink
Adding mysql command
Browse files Browse the repository at this point in the history
  • Loading branch information
dbpolito authored Feb 2, 2018
1 parent 91aae3c commit 8d51d55
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docker-files/vessel
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,20 @@ if [ $# -gt 0 ]; then
mysqldump -h mysql -u root -p$DB_PASSWORD --default-character-set=utf8mb4 $DB_DATABASE | grep -v "mysqldump: \[Warning\]"
fi

# If "mysql" is used, run mysql
# from our mysql container
elif [ "$1" == "mysql" ]; then
shift 1
if [ "$EXEC" == "yes" ]; then
$COMPOSE exec \
mysql \
mysql -u root -p$DB_PASSWORD $DB_DATABASE $@"
else
$COMPOSE run --rm \
mysql \
mysql -u root -p$DB_PASSWORD $DB_DATABASE $@"
fi

# If "node" is used, run node
# from our node container
elif [ "$1" == "node" ]; then
Expand Down

0 comments on commit 8d51d55

Please sign in to comment.