Last active
February 28, 2017 17:49
-
-
Save FlYos/f9ffd13ac6ab8f4907ea57acf3aa4f03 to your computer and use it in GitHub Desktop.
Shotcut for use laradock
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
#! /bin/bash | |
# | |
# 1 - install the laradock on your machine : https://github.com/laradock/laradock | |
# 2 - customize your docker-compose.yml depending on your installation option | |
# 3 - change the path to laradock | |
# 4 - run ./docker and enjoy | |
PATH_LARADOCK="./laradock" | |
function laradock() { | |
(cd $PATH_LARADOCK && docker-compose $*); | |
unset -f laradock; | |
} | |
if [[ "$1" == "start" ]]; then | |
laradock up -d apache2 mysql phpmyadmin | |
elif [[ "$1" == "stop" ]]; then | |
laradock stop | |
elif [[ "$1" == "down" ]]; then | |
laradock down | |
elif [[ "$1" == "ssh" ]]; then | |
laradock exec workspace bash | |
else | |
echo -e "" | |
echo -e "\033[33mInstallation :\033[0m" | |
echo -e "\033[33m============\033[0m" | |
echo -e "" | |
echo -e "1 - install the laradock on your machine : https://github.com/laradock/laradock" | |
echo -e "2 - customize your docker-compose.yml depending on your installation option" | |
echo -e "3 - change the path to laradock and machine to run" | |
echo -e "4 - run ./docker and enjoy" | |
echo -e "" | |
echo -e "\033[33mHow to use :\033[0m" | |
echo -e "\033[33m============\033[0m" | |
echo -e "" | |
echo -e "\033[32m./docker start\033[0m: start docker machines" | |
echo -e "\033[32m./docker stop\033[0m: stop all docker machines started" | |
echo -e "\033[32m./docker ssh\033[0m: enter in machine in SSH" | |
fi | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment