Skip to content

Instantly share code, notes, and snippets.

@DanThiffault
Created January 23, 2016 21:07
Show Gist options
  • Save DanThiffault/1fb960973606bbedfbe4 to your computer and use it in GitHub Desktop.
Save DanThiffault/1fb960973606bbedfbe4 to your computer and use it in GitHub Desktop.
Elixir Phoenix Dev Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrant file for elixir & phoenix dev
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.provider :virtualbox do |vb|
vb.name = "elixirdev"
end
config.vm.network :forwarded_port, host: 4000, guest: 4000
config.vm.network :private_network, ip: "192.168.33.12"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.provision :shell, inline: <<-SCRIPT
sudo update-locale LC_ALL=en_US.UTF-8
sudo apt-get install -y wget
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y postgresql python-pip esl-erlang git ntp
sudo apt-get install -y elixir
pip -q install awscli
mix local.hex --force
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez --force
sudo -u postgres PGPASSWORD=postgres psql -U postgres -c "ALTER USER postgres PASSWORD 'postgres';"
sh -c 'echo "cd /vagrant" > .bash_profile'
SCRIPT
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment