Skip to content

Commit

Permalink
add restart shortcut for restarting specific containers
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanbarlog authored Oct 30, 2017
1 parent 0285bc3 commit d291332
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ops
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ init {domain} - initializes the project from scratch
up - brings containers up
stop - stops containers
down - stops and removes containers
restart - stops, rebuilds and starts specified containers eg. '$0 restart nginx fpm' will restart nginx and fpm
bin/console - runs Symfony's bin/console within cli container
composer - runs composer within cli container
npm - runs npm within node container
Expand Down Expand Up @@ -67,6 +68,10 @@ case "$1" in
down)
$COMPOSE down
;;
restart)
shift 1
$COMPOSE stop "$@" && $COMPOSE build "$@" && $COMPOSE up -d "$@"
;;
bin/console)
shift 1
$COMPOSE exec cli bin/console "$@"
Expand Down

0 comments on commit d291332

Please sign in to comment.