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.
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.
- Download dependencies
- Install the Laravel Homestead Box for vagrant
vagrant box add laravel/homestead
- Clone the Homestead repo to the directory of the project
git clone https://github.com/laravel/homestead.git ~/Workspace/webProject2
- Navigate to the directory & checkout release
cd ~/Workspace/webProject2
git checkout release
- Install homestead
- Windows:
init.bat
- Mac / Linux:
bash init.sh
- Windows:
- Generate encryption keys
ssh-keygen -t rsa -C "you@homestead.com"
- Clone the following repo into the webProject2 directory
git clone https://github.com/jwoodrow99/webProject2.git webProject2-app
- 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
- Start your Vagrant / Homestead box
vagrant up
vagrant ssh
- 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
- Edit your host file to map "webProject2.test" to 192.168.10.10
- Edit host file OSX
- Edit host file Windows
- EXAMPLE:
192.168.10.10 webProject2.test
- 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