Vagrant and VirtualBox (or some other VM provider) can be used to quickly build or rebuild virtual servers.
This repository contains the Ansible automation code to provision a simple Nginx, MySQL and PHP (the 'EMP' part of 'LEMP') environment.
- LEMP (Linux Nginx 1.4, MySQL, and PHP-fpm 7.0) installed
- MySQL connection details:
- host:
localhost - port:
3306 - dbname:
dohernandez - username:
dohernandez - password:
dohernandez
- host:
- MySQL connection details:
Note
To enable the php 5.6 version you should edit the file "vars/all.yml".
php5x:
install: '0'
by default, the php 5.6 version is disable
php5x:
install: '1'
- Composer installed
- XDebug
- MongoDB
- MongoDB connection details:
- host:
localhost - port:
27017
- host:
- MongoDB connection details:
- Redis
To edit additional configuration options exposes in VirtualBox-powered Vagrant environments,
copy the config/box_setting.dist.yml to config/box_setting.yml and edit the file.
To edit where Ansible can find its commands to run during the vagrant provision,
copy the config/box_setting.dist.yml to config/box_setting.yml and edit the file.
Make sure you have the following software installed in your machine. If running OSX, just follow the instructions below.
Homebrew and Cask make it very easy to install software on OSX.
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Cask
brew install caskroom/cask/brew-cask
# Install git
brew install git
# Install virtualbox
brew cask install virtualbox
# Install vagrant and plugins
brew cask install vagrant
vagrant plugin install vagrant-hostmanagerTo get started developing:
- Clone this repository somewhere.
- Cd into the repository
- Run
vagrant upto get the VM running. - Your application code go into
src/<app name>, ex:src/laravel. - Your public files go into
src/<app name>/public, ex:src/laravel/public.