forked from dokku-alt/dokku-alt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
35 lines (30 loc) · 1.65 KB
/
Vagrantfile
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
34
35
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV["BOX_NAME"] || "trusty"
BOX_URI = ENV["BOX_URI"] || "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
BOX_MEMORY = ENV["BOX_MEMORY"] || "1024"
DOKKU_DOMAIN = ENV["DOKKU_DOMAIN"] || "dokku.me"
DOKKU_IP = ENV["DOKKU_IP"] || "10.0.0.2"
Vagrant::configure("2") do |config|
config.vm.box = BOX_NAME
config.vm.box_url = BOX_URI
config.vm.synced_folder File.dirname(__FILE__), "/srv/dokku-alt"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.hostname = "#{DOKKU_DOMAIN}"
config.vm.network :private_network, ip: DOKKU_IP
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# Ubuntu's Raring 64-bit cloud image is set to a 32-bit Ubuntu OS type by
# default in Virtualbox and thus will not boot. Manually override that.
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
vb.customize ["modifyvm", :id, "--memory", BOX_MEMORY]
end
# Configure docker apt sources
config.vm.provision :shell, :inline => "apt-get update -qq"
config.vm.provision :shell, :inline => "apt-get install -y apt-transport-https git"
config.vm.provision :shell, :inline => "apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9"
config.vm.provision :shell, :inline => "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
config.vm.provision :shell, :inline => "apt-get update -qq"
# Install dokku-alt
config.vm.provision :shell, :inline => "cd /srv/dokku-alt && make install && make devinstall"
end