adding options
This commit is contained in:
parent
7b180524e3
commit
1d2f385586
20
laradock.sh
20
laradock.sh
|
@ -7,12 +7,12 @@
|
||||||
# chmod 755 sync.sh
|
# chmod 755 sync.sh
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# Install docker-sync: ./sync.sh install
|
# Install docker-sync: ./laradock.sh sync install
|
||||||
# Start sync and services with nginx and mysql: ./sync.sh up nginx mysql
|
# Start sync and services with nginx and mysql: ./laradock.sh sync up nginx mysql
|
||||||
# Open bash inside the workspace: ./sync.sh bash
|
# Stop containers and sync: ./laradock.sh sync down
|
||||||
# Stop containers and sync: ./sync.sh down
|
# Open bash inside the workspace: ./laradock.sh bash
|
||||||
# Force sync: ./sync.sh trigger
|
# Force sync: ./laradock.sh sync trigger
|
||||||
# Clean synced files: ./sync.sh clean
|
# Clean synced files: ./laradock.sh sync clean
|
||||||
|
|
||||||
# prints colored text
|
# prints colored text
|
||||||
print_style () {
|
print_style () {
|
||||||
|
@ -53,7 +53,7 @@ fi
|
||||||
|
|
||||||
if [ "$1" == "sync" ] ; then
|
if [ "$1" == "sync" ] ; then
|
||||||
shift; # removing first argument
|
shift; # removing first argument
|
||||||
print_style "Using Docker Sync\n" "info";
|
print_style "Using docker-sync to speed up Docker on OSX and Windows.\n" "success";
|
||||||
|
|
||||||
if [ "$1" == "up" ] ; then
|
if [ "$1" == "up" ] ; then
|
||||||
print_style "Initializing Docker Sync\n" "info";
|
print_style "Initializing Docker Sync\n" "info";
|
||||||
|
@ -88,7 +88,7 @@ if [ "$1" == "sync" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
print_style "Not using synced files might be slow on OSX and Windows. Use 'sync' option to speed up.\n";
|
print_style "Not using docker-sync might might be slow on OSX and Windows. Use 'sync' option to speed up.\n";
|
||||||
|
|
||||||
if [ "$1" == "up" ] ; then
|
if [ "$1" == "up" ] ; then
|
||||||
print_style "Initializing Docker Compose\n" "info";
|
print_style "Initializing Docker Compose\n" "info";
|
||||||
|
@ -99,6 +99,10 @@ else
|
||||||
print_style "Stopping Docker Compose\n" "info";
|
print_style "Stopping Docker Compose\n" "info";
|
||||||
docker-compose down;
|
docker-compose down;
|
||||||
|
|
||||||
|
elif [ "$1" == "build" ]; then
|
||||||
|
print_style "Building workspace\n" "info";
|
||||||
|
docker-compose build workspace;
|
||||||
|
|
||||||
elif [ "$1" == "bash" ]; then
|
elif [ "$1" == "bash" ]; then
|
||||||
docker-compose exec workspace bash;
|
docker-compose exec workspace bash;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue