docker info > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Docker is not running." exit 1 fi set -e docker run --rm \ -v "$(pwd)":/opt \ -w /opt \ laravelsail/php80-composer:latest \ bash -c "laravel new sitemap.xml && cd sitemap.xml && php ./artisan sail:install --with=mailhog,mysql,redis && composer require aerocommerce/setup && php ./artisan aero:sail" cd sitemap.xml CYAN='\033[0;36m' LIGHT_CYAN='\033[1;36m' WHITE='\033[1;37m' NC='\033[0m' echo "" if sudo -n true 2>/dev/null; then sudo chown -R $USER: . else echo -e "${WHITE}Please provide your password so we can make some file permission adjustments.${NC}" echo "" sudo chown -R $USER: . fi echo "" echo -e "${CYAN}Booting the virtual environment.${NC}" echo "" ./vendor/bin/sail up -d if [ -f ./.env ]; then source ./.env fi export APP_PORT=${APP_PORT:-80} export APP_SERVICE=${APP_SERVICE:-"laravel.test"} export WWWUSER=${WWWUSER:-$UID} export WWWGROUP=${WWWGROUP:-$(id -g)} docker-compose exec -u sail -d "$APP_SERVICE" php artisan aero:setup echo "" echo -e "${WHITE}Ready!${NC} Visit http://localhost to view your new store." echo ""