paq85 / symfony-vagrant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vagrant for Symfony Standard Edition Project

This project will help you create a Vagrant managed Virtual Machine for developing Symfony Framework based projects

Requirements

  • Vagrant
  • VirtualBox

Setup

Setup Hosts

Edit /etc/hosts so you can access created VM by symfony.dev domain. Add following line:

192.168.33.10 symfony.dev

Run Vagrant

vagrant up

Validate Apache and PHP works properly by opening PHP Info

Setup new Symfony Standard Edition Project

Log in to VM and run

cd /vagrant/projects
symfony new symfony_project
ln -s /vagrant/projects/symfony_project/web /vagrant/web/symfony_project

Newly created symfony project is now in symfony_project folder. It should be available via web browser at Symfony App Example

Some small adjustments are needed:

Edit symfony_project/app/console

  • Uncomment umask(0000);

Edit symfony_project/web/app_dev.php

  • Uncomment umask(0000);
  • Change allowed IP address to 192.168.33.1 array('127.0.0.1', 'fe80::1', '::1', '192.168.33.1')

Symfony project should be available HERE - eg. Example Page

Enjoy developing your Symfony based project :)

Performance Optimization

  • Consider using Vagrant Cachier plugin vagrant plugin install vagrant-cachier
  • Consider using vagrant-winnfsd vagrant plugin install vagrant-winnfsd
  • Consider moving Symfony cache and logs to VM's folder

Credits

nater1067/Vagrant-Symfony-2 and other scripts and articles found on the web

About

License:MIT License


Languages

Language:Puppet 99.4%Language:PHP 0.6%