1 Star 0 Fork 939

0.0/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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/admin_user/wookteam.git
[email protected]:admin_user/wookteam.git
admin_user
wookteam
wookteam
master

搜索帮助