This is a minimalistic PHP57/Postgres vagrant box meant to be used by the FE, so it might not be fully featured for all the projects requirements. However, it can be twaked to include anything else the team might need that doesn't require a lot of effort. The goal is to jumpstart the development proccess for FE'ends if they strictly need something that the staging server can't provide. e.g generating the reset password link to be used locally.
It can only be used in Mac right now, but with some work it can work in Windows also.
Start by running bash init.sh within the main directory after cloning, this creates a new directory in ~/.Homestead56. Setup this box's Homestead file at ~/.Homestead56/Homestead.yaml
Every change to the Homestead.yaml file must be followed by a vagrant provision
For more information on how to setup homestead official documentation is located here.
-
Install Virtual Box and Vagrant if not already installed.
-
Git clone
https://github.com/BCVSocial/homestead56.git -
cd homestead56 -
vagrant plugin install vagrant-vbguest -
edit your
/etc/hostsfile and add the following entry:
127.0.0.1 activesocial.bcv.dev
-
Check
~/.Homestead56/Homestead.yamlto see if it matches your local setup of the project.folders: - map: ~/BCVSocial to: /home/vagrant/BCVSocial type: nfs sites: - map: activesocial.bcv.dev ## Important, this is one of the allowed hostnames inside web/app_dev.php file. to: /home/vagrant/BCVSocial/ActiveSocial/web type: symfony -
bash init.sh && vagrant up -
vagrant provision & vagrant reload -
Finally, if you try and run
vagrant sshyou should be able to ssh into the virtual machine, to continue with the symfony setup. -
login to postgres to check where the pg_hba.conf file is: *
psql -U homestead -h localhostpassword is secret *SHOW hba_file;Should be/etc/postgresql/9.4/main/pg_hba.conf -
Edit the file and look for the following lines:
host all all 127.0.0.1/32 md5 host all PC 127.0.0.1/32 md5 host all all ::1/128 md5
* Change all ocurrences of md5 to trust
- Run
sudo service postgresql restart
-
cdinto the main projectActiveSocialand runcomposer installwait, follow instructions, wait some more. -
php app/console doctrine:database:create -
php app/console doctrine:schema:update --force -
php app/console hautelook_alice:doctrine:fixtures:load
After following these steps you should have a decent vagrant/symfony setup, remember to update your config.js file:
export const serverUrl = 'http://activesocial.bcv.dev:8000/app_dev.php';
Improve performance, it's a little slow, see http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html
Go ahead =)
NFS is reporting that your exports file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":
sudo rm /etc/exports
sudo touch /etc/exports
vagrant halt
vagrant up --provision
If you need to update the app url for symfony, edit config/parameters.yaml inside the app directory. After you have done that, from roo directory run: php app/console cache:clear --env=dev