Coder Social home page Coder Social logo

ds-homestead's Introduction

DS.org Homestead

The official Laravel local development environment, tweaked for DoSomething.org. Your one installation of Homestead can be used to host all your Laravel (or other PHP) projects.

Getting Started

Clone this repository somewhere on your machine, for example ~/Sites/homestead.

Copy the included example configuration and customize for your machine:

$ cp Homestead.default.yaml Homestead.yaml

Make sure folders maps your local code directory (e.g. ~/Sites) to the same path on the virtual machine, and then add an entry to sites mapping a domain to each Laravel application's public directory. Remember to add each domain (e.g. 127.0.0.1 laravel.dev) to your machine's /etc/hosts file!

Finally, add this function to your .bashrc to easily access the Homestead Vagrant machine from anywhere (be sure to change the HOMESTEAD_DIRECTORY to match where you cloned this repository!)

function hs() {
  DIRECTORY=$(pwd)
  HOMESTEAD_DIRECTORY=~/Sites/homestead
  HOME_RELATIVE_DIRECTORY=${DIRECTORY/$HOME/\~}
  DEFAULT="ssh --command \"cd $HOME_RELATIVE_DIRECTORY; bash\""
  (cd $HOMESTEAD_DIRECTORY; eval "vagrant ${*:-$DEFAULT}")
}

If you change the sites property after provisioning the Homestead box, you should run hs reload --provision to update the Nginx configuration on the virtual machine.

Usage

You can start the virtual machine by running hs up. Any Laravel domains you configured (by adding them to the sites config and /etc/hosts file as described above) will be accessible at http://project_name.dev:8000.

You can SSH from a project directory on your local machine to the corresponding directory on your virtual machine by simply running hs. Finally, you can shut down your Homestead box by running hs halt.

Troubleshooting

You may get "key checking" errors if you are switching between multiple Vagrant boxes on the same machine. You can disable key checking for your local machine by adding the following lines to your ~/.ssh/config file.

Host 127.0.0.1
  StrictHostKeyChecking no
  UserKnownHostsFile=/dev/null

ds-homestead's People

Contributors

angaither avatar blisteringherb avatar chloealee avatar dfurnes avatar jonuy avatar pnasrat avatar sergiitk avatar sheyd avatar weerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ds-homestead's Issues

update php version

it seems the newer version of homestead uses php7, not php7 and when running vagrant up, it gives php5-fpm unrecognized service

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.