Skip to content

Instantly share code, notes, and snippets.

@mmzeeman
Created April 7, 2013 12:38

Revisions

  1. mmzeeman created this gist Apr 7, 2013.
    47 changes: 47 additions & 0 deletions Vagrantfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    # -*- mode: ruby -*-
    # vi: set ft=ruby :

    Vagrant::Config.run do |config|
    # Every Vagrant virtual environment requires a box to build off of.
    config.vm.box = "precise32"
    config.vm.box_url = "http://files.vagrantup.com/precise32.box"

    # config.vm.boot_mode = :gui
    config.vm.host_name = "zotonic-r15"

    # Setup locales for UTF8 support
    config.vm.provision :shell, :inline => "locale-gen en_US.UTF-8"

    # Simple provisioning for a working zotonic setup
    config.vm.provision :shell, :inline => "apt-get -y update"
    config.vm.provision :shell, :inline => "apt-get -y install python-software-properties"

    # Add erlang solutions package.
    config.vm.provision :shell, :inline => "wget -O - http://binaries.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add -"
    config.vm.provision :shell, :inline => "add-apt-repository 'deb http://binaries.erlang-solutions.com/debian precise contrib'"

    config.vm.provision :shell, :inline => "apt-get -y update"

    # Basic requirements.
    config.vm.provision :shell, :inline => "apt-get -y install ack-grep build-essential git vim"
    config.vm.provision :shell, :inline => "apt-get -y install imagemagick postgresql-9.1 postgresql-client-9.1"

    # Install Erlang R15B03
    config.vm.provision :shell, :inline => "apt-get -y install esl-erlang=1:15.b.3-2~ubuntu~precise"

    # Uncomment if you want to install Erlang R16
    # config.vm.provision :shell, :inline => "apt-get -y install esl-erlang"

    # Forwarding port 8000, 8443, 2525
    config.vm.forward_port 8000, 8000
    config.vm.forward_port 8443, 8443
    config.vm.forward_port 2525, 2525

    # The directory containing the sites and modules you are working on.
    config.vm.share_folder "project", "/project", "~/Work/<your-project>"

    config.vm.customize ["modifyvm", :id,
    "--memory", 1024,
    "--cpus", 2]

    end