This Vagrant profile installs Php, Nginx, MySQL and others, using the Ansible provisioner.
The roles install these software in the guest machine:
- php 7.0 => geerlingguy/ansible-role-php
- nginx 1.10 => jdauphant/ansible-role-nginx
- mysql 5.7 => geerlingguy/ansible-role-mysql
- xdebug => geerlingguy/ansible-role-php-xdebug
- ssl-cert => jdauphant/ansible-role-ssl-certs
- composer => geerlingguy/ansible-role-composer
- redis => DavidWittman/ansible-redis
- nodejs => geerlingguy/ansible-role-nodejs
- VirtualBox
- Vagrant 1.9 or later
- Vagrant Host Manager plugin
Ansible is installed into guest machine, it is not required into your host
Clone the repo:
git clone https://github.com/lluisi/web-environment.git && cd web-environment
Rename and configure sample files into provision/config/
provision/config/sample/vm_config_sample.yml
Configure your VM as your needs:
box:
name: your-box
url: http://the-url-of-your-box
vm:
name: web-environment
hostname: web.env
memory: 1024
cpus: 1
network:
private_network: 192.168.57.101
provision/config/sample/host_aliases_sample.yml
Define as many hosts as you need for your own development projects:
- my-project-a.local
- my-project-b.local
provision/config/sample/synced_folder_sample.yml
Sync your local folders with your VM:
my-project-a:
type: nfs
source: ../my-project-a
target: /var/www/my-project-a
my-project-b:
type: nfs
source: ../my-project-b
target: /var/www/my-project-b
provision/config/sample/vars/php_sample.yml
provision/config/sample/vars/nginx_sample.yml
provision/config/sample/vars/mysql_sample.yml
provision/config/sample/vars/xdebug_sample.yml
provision/config/sample/vars/ssl_sample.yml
And finally:
vagrant up