Expose docker-compose through diaspora-dev script
As the docker-compose.yml contains variables, it can't just be used with docker-compose directly. So this manually use docker-compose commands with all the required environment variables set.
This commit is contained in:
parent
a4d45358a2
commit
1358f6fbb8
1 changed files with 28 additions and 20 deletions
|
|
@ -44,6 +44,10 @@ print_usage() {
|
||||||
print_usage_header "clean [options]" \
|
print_usage_header "clean [options]" \
|
||||||
" --config Delete configuration files as well"
|
" --config Delete configuration files as well"
|
||||||
;;
|
;;
|
||||||
|
docker-compose)
|
||||||
|
echo; echo "Run docker-compose commands with the required environment variables"
|
||||||
|
print_usage_header "docker-compose [options]"
|
||||||
|
;;
|
||||||
# test & development
|
# test & development
|
||||||
cucumber)
|
cucumber)
|
||||||
echo; echo "Run cucumber tests"
|
echo; echo "Run cucumber tests"
|
||||||
|
|
@ -136,30 +140,31 @@ print_usage_full() {
|
||||||
print_usage_header "$SCRIPT_NAME COMMAND"
|
print_usage_header "$SCRIPT_NAME COMMAND"
|
||||||
echo
|
echo
|
||||||
echo "Management Commands:"
|
echo "Management Commands:"
|
||||||
echo " setup Prepare diaspora* to run for development"
|
echo " setup Prepare diaspora* to run for development"
|
||||||
echo " start Start diaspora*"
|
echo " start Start diaspora*"
|
||||||
echo " stop Stop diaspora*"
|
echo " stop Stop diaspora*"
|
||||||
echo " restart Restart of diaspora*"
|
echo " restart Restart of diaspora*"
|
||||||
echo " logs Follow log output of diaspora*"
|
echo " logs Follow log output of diaspora*"
|
||||||
echo " status Show current instance status of diaspora*"
|
echo " status Show current instance status of diaspora*"
|
||||||
echo " clean Reset diaspora* instance"
|
echo " clean Reset diaspora* instance"
|
||||||
|
echo " docker-compose Run docker-compose commands"
|
||||||
echo
|
echo
|
||||||
echo "Test and Development Commands:"
|
echo "Test and Development Commands:"
|
||||||
echo " cucumber Run cucumber tests"
|
echo " cucumber Run cucumber tests"
|
||||||
echo " jasmine Run jasmine tests"
|
echo " jasmine Run jasmine tests"
|
||||||
echo " rspec Run rspec tests"
|
echo " rspec Run rspec tests"
|
||||||
echo " pronto Run pronto checks"
|
echo " pronto Run pronto checks"
|
||||||
echo " migrate Execute pending migrations"
|
echo " migrate Execute pending migrations"
|
||||||
echo
|
echo
|
||||||
echo "Misc. Commands:"
|
echo "Misc. Commands:"
|
||||||
echo " build Build basic diaspora* environment"
|
echo " build Build basic diaspora* environment"
|
||||||
echo " bundle (Re-)Install gems for diaspora*"
|
echo " bundle (Re-)Install gems for diaspora*"
|
||||||
echo " yarn (Re-)Install frontend dependencies for diaspora*"
|
echo " yarn (Re-)Install frontend dependencies for diaspora*"
|
||||||
echo " config Configure diaspora*"
|
echo " config Configure diaspora*"
|
||||||
echo " exec Execute a command in the run environment (advanced)"
|
echo " exec Execute a command in the run environment (advanced)"
|
||||||
echo " help Show help for commands"
|
echo " help Show help for commands"
|
||||||
echo " setup-rails Prepare diaspora* development environment (install dependencies, migrate db)"
|
echo " setup-rails Prepare diaspora* development environment (install dependencies, migrate db)"
|
||||||
echo " setup-tests Prepare diaspora* test environment"
|
echo " setup-tests Prepare diaspora* test environment"
|
||||||
echo
|
echo
|
||||||
echo "Run '$SCRIPT_NAME help COMMAND' for more information on a command."
|
echo "Run '$SCRIPT_NAME help COMMAND' for more information on a command."
|
||||||
}
|
}
|
||||||
|
|
@ -556,6 +561,9 @@ case "$dia_command" in
|
||||||
cucumber)
|
cucumber)
|
||||||
dia_cucumber "$@"
|
dia_cucumber "$@"
|
||||||
;;
|
;;
|
||||||
|
docker-compose)
|
||||||
|
dia_docker_compose "$@"
|
||||||
|
;;
|
||||||
exec)
|
exec)
|
||||||
dia_exec "$@"
|
dia_exec "$@"
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue