-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #312 from handhikadj/master
Some bugfix and improve the docker setup
- Loading branch information
Showing
4 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! [ -x "$(command -v docker-compose)" ]; then | ||
echo 'docker-compose is not installed on your machine. Seems you should run the docker-install executable first to help you go through' >&2 | ||
sleep 1 | ||
exit 1 | ||
fi | ||
|
||
COMPOSE="docker-compose" | ||
|
||
if [ $# -gt 0 ]; then | ||
if [ "$1" == "artisan" ]; then | ||
shift 1 | ||
$COMPOSE run --rm artisan "$@" | ||
elif [ "$1" == "composer" ]; then | ||
shift 1 | ||
$COMPOSE run --rm composer "$@" | ||
elif [ "$1" == "rebuild" ]; then | ||
shift 1 | ||
$COMPOSE up -d --force-recreate --no-deps --build "$@" | ||
$COMPOSE down | ||
else | ||
$COMPOSE "$@" | ||
fi | ||
else | ||
$COMPOSE ps | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters