Last active
September 14, 2015 18:17
-
-
Save Dania02525/42e64b9b197a7bd2507f to your computer and use it in GitHub Desktop.
Vagrant file for trusty with erlang, elixir, postgres 9.4 and git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.configure(2) do |config| | |
| config.vm.box = "ubuntu/trusty64" | |
| config.vm.network "forwarded_port", guest: 4000, host: 4000 | |
| config.vm.provision :shell, :inline => PROVISION | |
| end | |
| PROVISION = <<EOP | |
| if ! hash erl 2>/dev/null; then | |
| cd /tmp/ | |
| wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
| dpkg -i erlang-solutions_1.0_all.deb | |
| apt-get update | |
| apt-get install -y esl-erlang | |
| fi | |
| if ! hash elixir 2>/dev/null; then | |
| sudo apt-get install -y elixir | |
| fi | |
| if ! hash postgresql-9.4 2>/dev/null; then | |
| sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | |
| wget --quiet -O - postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-9.4 | |
| sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" | |
| fi | |
| if ! hash git 2>/dev/null; then | |
| sudo apt-get install -y git | |
| fi | |
| if ! hash inotify-tools 2>/dev/null; then | |
| sudo apt-get install -y inotify-tools | |
| fi | |
| EOP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment