-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevelop.sh
More file actions
executable file
·43 lines (41 loc) · 1.14 KB
/
develop.sh
File metadata and controls
executable file
·43 lines (41 loc) · 1.14 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
# ip -4 addr show wlp2s0|grep inet |awk -F ' ' '{ print substr($2,0,12)}'
if [ $# -gt 0 ]; then
if [ "$1" == "start" ]; then
docker-compose up -d
elif [ "$1" == "stop" ]; then
docker-compose down
elif [ "$1" == "composer" ] || [ "$1" == "comp" ]; then
shift 1;
docker-compose exec \
app \
composer "$@"
elif [ "$1" == "test" ]; then
shift 1;
docker-compose exec \
app \
./vendor/bin/phpunit "$@"
elif [ "$1" == "artisan" ] || [ "$1" == "art" ]; then
## If project is running artisan
shift 1;
docker-compose exec \
app \
php artisan "$@"
elif [ "$1" == "yarn" ]; then
## If project is running artisan
shift 1;
docker-compose run --rm \
node \
yarn "$@"
elif [ "$1" == "npm" ]; then
## If project is running artisan
shift 1;
docker-compose run --rm \
node \
npm "$@"
else
docker-compose "$@"
fi
else
docker-compose ps
fi