NAME

MAJOR NOTES

This is the project description.

Our stack:

  • Ubuntu
  • Nginx
  • PHP (with Laravel)
  • MySQL

We will be using Laravel with the Homestead Vagrant box for the development environment. This repo contains all of the necessary configuration files for the vagrant box as well as step by step instructions on how to set up the development environment.

Setup dev environment

All steps are the same if you are using Windows or Mac, however if you are a windows user it is recommended to use the Power Shell or the Git Bash terminal for all terminal commands.

  1. Download dependencies
  2. Install the Laravel Homestead Box for vagrant vagrant box add laravel/homestead
  3. Clone the Homestead repo to the directory of the project git clone https://github.com/laravel/homestead.git ~/Workspace/webProject2
  4. Navigate to the directory & checkout release
cd ~/Workspace/webProject2
git checkout release 
  1. Install homestead
    • Windows: init.bat
    • Mac / Linux: bash init.sh
  2. Generate encryption keys ssh-keygen -t rsa -C "you@homestead.com"
  3. Clone the following repo into the webProject2 directory
git clone https://github.com/jwoodrow99/webProject2.git webProject2-app
  1. Copy the Homestead.yaml file from the app repo into the homestead folder
cp ~/Workspace/webProject2/webProject2-app/Homestead.yaml.example ~/Workspace/webProject2/Homestead.yaml
  1. Start your Vagrant / Homestead box
vagrant up 
vagrant ssh 
  1. Setup laravel dependencies for both applications
    • In the application folder run the following commands
cp .env.example .env
composer install
php artisan key:generate
php artisan migrate
php artisan db:seed
  1. Edit your host file to map "webProject2.test" to 192.168.10.10
  2. Close your Vagrant / Homestead box
exit
vagrant halt 

Now what you have is a local development environment inside of a VM already configured for a PHP & Laravel application!

NOTE: The application is linked in your VM, any changes you make in either the vm or locally will automatically change in the other.

Passwords for all features on Homestead:
Username: homestead
Password: secret
MySQL port: 2200 OR 33060

REFRENCE