public
Created

Vagrantfile for a zotonic development environment on a standard ubuntu 12.04 box.

  • Download Gist
Vagrantfile
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
# -*- 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-dev"
 
# 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 ack-grep build-essential git vim"
config.vm.provision :shell, :inline => "apt-get -y install imagemagick postgresql-9.1 postgresql-client-9.1"
config.vm.provision :shell, :inline => "apt-get -y install erlang-base erlang-tools erlang-parsetools erlang-inets erlang-ssl erlang-eunit erlang-dev erlang-xmerl erlang-src"
 
# 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/the-project"
 
config.vm.customize ["modifyvm", :id,
"--memory", 1024,
"--cpus", 2]
 
end

Oh, and if you create a new database you should do this:

CREATE USER zotonic WITH PASSWORD 'zotonic';
CREATE DATABASE zotonic WITH OWNER zotonic ENCODING = 'UTF-8'
LC_CTYPE = 'en_US.utf8' LC_COLLATE = 'en_US.utf8'
TEMPLATE template0;
GRANT ALL ON DATABASE zotonic TO zotonic;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.