1 Star 0 Fork 828

jfzhang1983 / wookteam

forked from aipaw / wookteam 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cmd 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
kuaifan 提交于 2020-06-11 00:12 . no message
#!/usr/bin/env bash
COMPOSE="docker-compose"
if [ $# -gt 0 ];then
if [[ "$1" == "artisan" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php php artisan "$@"
elif [[ "$1" == "php" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php php "$@"
elif [[ "$1" == "composer" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php composer "$@"
elif [[ "$1" == "supervisorctl" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php supervisorctl "$@"
elif [[ "$1" == "test" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php ./vendor/bin/phpunit "$@"
elif [[ "$1" == "npm" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php npm "$@"
elif [[ "$1" == "yarn" ]]; then
shift 1
$COMPOSE run --rm -w /var/www php yarn "$@"
elif [[ "$1" == "mysql" ]]; then
shift 1
$COMPOSE run --rm -w / mariadb mysql "$@"
elif [[ "$1" == "restart" ]]; then
shift 1
$COMPOSE stop
$COMPOSE start
else
$COMPOSE "$@"
fi
else
$COMPOSE ps
fi
PHP
1
https://gitee.com/jfzhang1983/wookteam.git
git@gitee.com:jfzhang1983/wookteam.git
jfzhang1983
wookteam
wookteam
master

搜索帮助