- Ubuntu 14.04
- Nginx
- Mysql
- PHP-FPM
- Redis
- Nodejs
- HHVM FastCGI
- mailcatcher
- Elasticsearch
- Vim
- Mercurial
- cURL
- htop
- memcached
- Xdebug and Webgrind
- Requires the following entry in
/etc/hosts
:192.168.33.10 webgrind
- Requires the following entry in
- XHProf and XHProf.io
- Requires the following entry in
/etc/hosts
:192.168.33.10 xhprof
- Requires the following entry in
devbox-next comes with latest Trusty Tahr-supported PHP 5.5 version, plus the following PHP modules:
- php5-apcu
- php5-gd
- php5-json
- php5-curl
- php5-memcache
- php5-mysql
- php5-mcrypt
- php5-xdebug
- yaml
- phing
- Symfony/Classloader
- Zend 1.7.8
- Doctrine 1.2.2
- PHPUnit
- Twig
- composer
-
Grab and install the appropriate version of [Vagrant] (http://www.vagrantup.com/downloads.html) for your distro.
-
Install vagrant-vbguest plugin. This will ensure your guest additions stay up-to-date.
$ vagrant plugin install vagrant-vbguest
-
Create a symlink from your working files to
/workspace
. e.g.:$ sudo ln -s /home/{myusername}/workspace /workspace
-
Create a folder of symlinks at
/srv/sites-enabled/
that point to web roots that reside your workspace, relative to/workspace
. For example, if you would like to servehttp://mysite.myname
that resides in/workspace/mysite/path/to/webroot
you would use the command$ sudo ln -s /workspace/mysite/path/to/webroot/ /srv/sites-enabled/mysite.myname
You would then be able to view the page in your browser at http://mysite.myname:8080 (Web requests are served at 8080)
-
Clone this repo
$ git clone git@github.com:tristankenney/devbox-next.git $ cd devbox-next
-
Add the Trusty box to Vagrant (this will take a while)
$ vagrant box add 'ubuntu/trusty64'
-
Provision the machine (this will also take a while)
$ vagrant up
Files that are accessible within your local system at the symlink /workspace
are available on the Vagrant machine at the same location, /workspace
. You can and should perform all local development tasks directly on the Vagrant machine, rather than on your native machine (builds, testing etc) as this ensures that correct permissions are used, and then local resources such as databases are created on the Vagrant machine rather than on your native machine.
vagrant
of course!
You can access the machine in one of two ways, either by issuing the command vagrant ssh
from within the cloned repository folder (this method doesn't require authentication information), or by SSHing using vagrant@localhost -p 2222
using the password vagrant
. The first method is preferred as it will accommodate for any port conflicts etc.
Mysql details are root:root
, and you can access Mysql Server by connecting directly on port 33307 or by creating a tunnel on port 2222 and then connecting via localhost the previous details.
XDebug requires a slightly more involved setup than you may be used to.
Setup sites to be debugged as per normal (on port 8080).
Anything you would like to be able to have breakpoints against will need to be mapped within Eclipse
Mapping should be done using both /workspace mappings avoid confusion
To debug cli scripts, you will need JIT debugging enabled within Eclipse
XDEBUG_CONFIG="idekey=ECLIPSE_DBGP" \
XDEBUG_SESSION_START=ECLIPSE_DBGP \
php \
-f /usr/local/bin/phpunit /workspace/integral/cruse/test/phpunit/induction/induction_INTEGRALCS2589_scormFilePocessorTest.php
or for PHPUnit
phpunit -d xdebug.profiler_enable=on \
-d xdebug.idekey=ECLIPSE_DBGP \
XYZTestCase.php
All sites symlinked above will be available at http://{url}:8080 for php-fpm and http://{url}:8081 for HHVM
- fix warnings / update import/* syntax
- Fix XHProf
Licensed under the terms of the MIT License