A happy union of Vagrant and Statamic CMS to allow you to develop your sites in peace without worrying about the next system update breaking something.
Currently working and tested on OSX only but should work just fine on Linux/BSD system and even Windows.
- Virtualbox
- Vagrant
- Ansible
- A copy of Statamic
You can get it here.
You can get it here.
Confirm that Vagrant
is good to go with $ which vagrant
which should give you something like /usr/bin/vagrant
in the terminal window.
You can get it here.
Confirm that Ansible
is good to go with $ which ansible
which should give you something like /usr/local/bin/ansible
in the terminal window.
You can get it here. Place the source code in ./vagrant-statamic/source/statamic
folder.
Navigate to the repository folder
cd ./vagrant-statamic
start vagrant
vagrant up
Want top run vagrant up
followed by the new hotness in Vagrant 1.5
that is Rsync Auto Resync
, use this shortcut.
./vagrant-up.sh
if you have any issues running it, try giving it execution permissions first
chmod +x vagrant-up.sh
vagrant
will read the Vagrantfile
and based on the configuration defined will create a virtual machine using Virtualbox
. It'll configure the following:
- Download and create a VM using Ubuntu Linux 32bit. (lines 14-15)
- Setup a virtual network and give the vm the ip address of
10.0.1.100
(line 19) - Set the hostname for the vm to be "web" (line 32)
- Setup
port forwarding
from yourlocal port 80
toport 8080 on the vm
(line 41). - Link
./source
folder in the repository folder to/var/www
on the vm (line 46). As this will be done usingNFS
, vagrant will need your root password. Windows users, please see special note further in the README.
- os - Ubuntu (32bit)
- apache - 2.4.x
- mod_php - 5.5.x
- mysql - NO!
Note for Windows Users:
Windows users will need to use Shared Folders instead of NFS folder for source code access.
Goto Vagranfile and comment out line 46 and uncomment line 49. This will get better in Vagrant 1.5
rename sample.htaccess
mv sample.htaccess .htaccess
All going well, you should be able to get to the site http://10.0.1.100.
Note: If you'd like to use a different IP address, adjust this in the Vagrantfile
. You will need to run vagrant destroy
(destroys the vm) command followed by vagrant up
(starts up/begins provisioning of the vm).
Vagrant configures the vm to accept requests to the domain statamic.dev
.
What you'll need to do is add the following to your /etc/hosts
10.0.1.100 statamic.dev