Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

helpful/local_dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Local Dev

About

These scripts will setup a Laravel Valet+ and WP CLI based local dev environment. Homebrew and Composer will also be installed if not already.

Install

After you have looked at the source and are happy, install by running bash -c "$( curl -fsSL https://raw.githubusercontent.com/helpful/local_dev/master/install.sh )"

This will install the dev environment, and make the script clone.sh available.

Install problems

  • Composer error - conflicting symfony/console versions: resolve with composer global require symfony/console "3.x" symfony/process "3.x", then re-run the install.
  • "Setting password for root user failed." warning: run sudo mysqladmin -uroot password 'root'
  • Misc: do brew services list to see if dnsmasq, mariadb, nginx and valet-php@7.2 are all running. If not use brew services start xxx to start the missing ones. If needed brew reinstall xxx is sometimes needed if they won't start and you can't see another error.

Usage

Running clone.sh will prompt for a few options, then copy the remote site into ~/Sites/xxx and open your browser to https://xxx.test to view it. It also accepts a single argument delete which will attempt to cleanly remove local sites when you're finished with them.

Updating / fixing valet

STUB:: In case of emergencies / problems, after debugging you can run bash -c "$( curl -fsSL https://raw.githubusercontent.com/helpful/local_dev/master/uninstall.sh )", restart your machine, then follow with a re-install using the command above. This will preserve ~/Sites and databases, but always backup first. Note - this isn't seamless, Nginx config files are delete which means you will need to run valet secure in each relevant Sites/* directory to turn on SSL again, and also the 'load image from live' code is lost. Ideally use clone.sh delete to remove a site and start again, or clone.sh and option 5 to re-clone/set it up from scratch.

Updating clone.sh

If you want to update clone.sh, you can run curl -o /usr/local/bin/clone.sh -fsSL https://raw.githubusercontent.com/helpful/local_dev/master/clone.sh ; chmod +x /usr/local/bin/clone.sh

Uninstalling

If you want to do a more thorough uninstall, including removing site files and databases, you can download the uninstall.sh script, and run it passing the argument nuke.

  • curl -o uninstall.sh https://raw.githubusercontent.com/helpful/local_dev/master/uninstall.sh
  • chmod +x uninstall.sh
  • ./uninstall.sh nuke
  • restart your machine

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages