make dc to use rallets-hub/docker-compose-dev.yml if current folder does not contain one
This commit is contained in:
parent
68ade09a56
commit
07390f657f
@ -216,7 +216,6 @@ alias brewu='brew update && brew upgrade && brew cleanup && brew doctor'
|
||||
# emacs
|
||||
alias emacs="env LC_CTYPE=zh_CN.UTF-8 emacs"
|
||||
|
||||
alias dc='docker-compose -f docker-compose-dev.yml'
|
||||
alias ds='dc exec server'
|
||||
alias drspec='dc exec sidekiq rspec'
|
||||
alias psetup='dc exec sidekiq rake parallel:setup'
|
||||
|
@ -172,3 +172,12 @@ function rgm {
|
||||
echo "Rip Search with $regex..."
|
||||
rg -U $regex
|
||||
}
|
||||
|
||||
function dc {
|
||||
if [ -e ./docker-compose-dev.yml ]; then
|
||||
docker_file_path=./docker-compose-dev.yml
|
||||
else
|
||||
docker_file_path=~/Projects/rallets-hub/docker-compose-dev.yml
|
||||
fi
|
||||
docker-compose -f $docker_file_path $@
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user