Anyone have a favorite Vagrant box to recommend for local development?
Personally, I use the Official Ubuntu Server 14.04 LTS (Trusty Tahr) builds (ubuntu/trusty64) because my VPS runs Ubuntu 14.04.
No surprises when I deploy from local to production.
I provision the box by running a script that installs the standard LAMP stack. MySQL is completely superfluous when running Kirby though.
After asking my question, I found this blog post by Travis Maynard with a nice simple Vagrantfile for Kirby.
To that, I’ve added a few lines to have the vagrant-hostsupdater plugin add local domains to my /etc/hosts
Had to do this all over today and went with Scotch Box, which is super-easy: https://box.scotch.io/
If Scotch box is a git repo and so is Kirby, how do you combine them in the same directory?
You If you want to use multiple git repos inside a repo, clone them as sub module - Kirby actually does it the same way.
For my Kirby installation I set up the content folder as an independent repository which I am using as a sub module…
Hope that helps
Thank you philipp. So could the directory structure of kirby with a scotchbox vagrant setup look something like this? And would the main kirby starterkit repo then be a sub-module of the vagrant repo? Finally, how could I bring gulp back into my workflow? Sorry for all the questions, just trying to get away from my current environment with MAMP and all it’s updates/issues.
website-name/ .git (for vagrant) .vagrant Vagrantfile public/ kirby-root-directory/ .git (for kirby) assets/ content/ kirby/ panel/ site/ themes/ thumbs/
Absolutely! You can use the scotch vagrant file or create a more complicated one using https://puphpet.com . If you want gulp, make sure your vagrant machine can run gulp tasks (vagrant machine must have node js installed) then you can connect to it using ssh go to the directory of your choice and run the gulp script.
Obviously you can also run node commands also from your pc since you have access to the same file structure, but where would be the point in running Kirby in a virtual environment…make sure you install all necessary modules inside your Kirby vagrant machine
Thanks again Philipp. You’re really helping me down this path!