forked from changeweb/Unifiedtransform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev
27 lines (24 loc) · 709 Bytes
/
dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'docker-compose is not installed on your machine. Seems you should run the docker-install executable first to help you go through' >&2
sleep 1
exit 1
fi
COMPOSE="docker-compose"
if [ $# -gt 0 ]; then
if [ "$1" == "artisan" ]; then
shift 1
$COMPOSE run --rm artisan "$@"
elif [ "$1" == "composer" ]; then
shift 1
$COMPOSE run --rm composer "$@"
elif [ "$1" == "rebuild" ]; then
shift 1
$COMPOSE up -d --force-recreate --no-deps --build "$@"
$COMPOSE down
else
$COMPOSE "$@"
fi
else
$COMPOSE ps
fi