Skip to content

Instantly share code, notes, and snippets.

@dethi
Created April 8, 2016 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dethi/f2170dd80581faf3b052ecf39c7e245b to your computer and use it in GitHub Desktop.
Save dethi/f2170dd80581faf3b052ecf39c7e245b to your computer and use it in GitHub Desktop.
Vagrantfile for Elixir/Phoenix project
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/wily64"
config.vm.hostname = "ubuntu-ex"
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get upgrade -y
apt-get install -y wget curl git tree build-essential inotify-tools
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
echo 'deb http://packages.erlang-solutions.com/ubuntu wily contrib' >> /etc/apt/sources.list
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
apt-key add erlang_solutions.asc && rm erlang_solutions.asc
apt-get update
apt-get install -y nodejs esl-erlang elixir
yes | su vagrant -c 'mix local.hex'
yes | su vagrant -c 'mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez'
echo 'cd /vagrant' >> /home/vagrant/.bashrc
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment