- Vagrant (https://www.vagrantup.com/)
- VirtualBox (https://www.virtualbox.org/)
- NFS Server
- Linux (tested) or Mac (untested)
(On Windows the syncing can be changed toSMB
sharing or default Virtualbox sharing, note that the default sharing mode of Virtualbox is slow!)
Provisions a Ubuntu 16.04 VM with all dependencies of Symfony and loads db-dump.sql
in the db on provision
vagrant up
start vm (creates a new vm if none is created)
vagrant halt
stop vm
vagrant destroy
destroy vm
vagrant ssh
open ssh session to the VM
The VM will bind to 192.168.100.100
, you can change this in the Vagrantfile
. Please add the following urls to your hostfile
(probably located at /etc/hosts
):
- app.dev
- phpmyadmin.dev
Visit http://app.dev in your browser, you should see aphpinfo
promt if not, something went wrong.
- connect to the VM by ssh (
vagrant ssh
command) and navigate to/var/www/app
(there's a alias, acting as shortcut, just type inapp
and hit enter. - remove the
web
folder containingindex.php
with the commandrm -rf web
- clone the a.s.s. repo with the command
git clone <a.s.s. repo url> .
- update the db and general config files at
app
folder and use127.0.0.1
as host,root
as user,123
as password,dev
as db scheme
There's a PHPMyAdmin sitting at http://phpmyadmin.dev, user is root
and password 123
There's a MailHog (intercepting all outgoing messages!) sitting at http://app.dev:8025 with user root
and password 123
There's the craft app sitting at http://app.dev
The source/app
folder gets synced to /var/www/app
as soon as you uncomment it in the Vagrantfile
This directory get's synced to /vagrant
inside the VM too, so you can also use it to move stuff.
- http://app.dev doesn't load after adding it to the hosts file => Flush your DNS cache https://help.dreamhost.com/hc/en-us/articles/214981288-Flushing-your-DNS-cache-in-Mac-OS-X-and-Linux (Linux should do that automatically for you!)
- Port 80 can't be forwarded => Adjust port 80 in the
Vagrantfile
to whatever you want, for example8080
on the host - NFS won't start => Either install the NFS Server package on your computer or fall back to Virtualbox default sharing (which is much slower!)