Skip to content

Instantly share code, notes, and snippets.

@gasman
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save gasman/8802632 to your computer and use it in GitHub Desktop.
Save gasman/8802632 to your computer and use it in GitHub Desktop.
Wagtail developer setup in Vagrant
import sys
import os
VM_ROOT = os.path.join(os.path.dirname(__file__), '..', '..', '..')
# Add our checked-out copies of wagtail and associated libraries,
# at the start of the path so that they take precedence over the pip installed ones
sys.path.insert(1, os.path.join(VM_ROOT, "django-modelcluster"))
sys.path.insert(1, os.path.join(VM_ROOT, "wagtail"))
#!/bin/bash
git clone git@github.com:torchbox/wagtaildemo.git
git clone git@github.com:torchbox/wagtail.git
git clone git@github.com:torchbox/django-modelcluster.git
cp local.py wagtaildemo/wagtaildemo/settings/
vagrant up
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Base box to build off, and download URL for when it doesn't exist on the user's system already
config.vm.box = "wagtail-base-v0.1"
config.vm.box_url = "http://downloads.torchbox.com/wagtail-base-v0.1.box"
# You can also build from a vanilla precise32 box, although it'll take longer
# config.vm.box = "precise32"
# config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
# Assign this VM to a host only network IP, allowing you to access it
# via the IP.
# config.vm.network "33.33.33.10"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.forward_port 8000, 8111
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.share_folder "project", "/home/vagrant/wagtaildemo", "./wagtaildemo"
config.vm.share_folder "wagtail", "/home/vagrant/wagtail", "./wagtail"
config.vm.share_folder "modelcluster", "/home/vagrant/django-modelcluster", "./django-modelcluster"
# Enable provisioning with a shell script.
config.vm.provision :shell, :path => "wagtaildemo/etc/install/install.sh", :args => "wagtaildemo"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment