-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
39 lines (34 loc) · 1.01 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
36
37
38
39
# -*- mode: ruby -*-
# vi: set ft=ruby ts=2 sw=2 expandtab :
PROJECT = "rust_rabbitmq_example"
ENV['VAGRANT_NO_PARALLEL'] = 'yes'
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
Vagrant.configure(2) do |config|
config.vm.define "queue_1" do |queue|
queue.vm.provider "docker" do |d|
d.image = "rabbitmq"
d.name = "#{PROJECT}_queue_1"
end
queue.vm.network "forwarded_port", guest: 15672, host: 8080
end
config.ssh.insert_key = false
config.vm.define "dev", primary: true do |app|
app.vm.provider "docker" do |d|
d.image = "allansimon/docker-dev-rust"
d.name = "#{PROJECT}_dev"
d.has_ssh = true
d.env = {
"HOST_USER_UID" => Process.euid,
}
d.link "#{PROJECT}_queue_1:queue_1"
end
# libssl-dev is required for compilation with amqp
app.vm.provision "installs", "type": "shell" do |installs|
installs.inline = "
sudo apt-get update
sudo apt-get install libssl-dev -y
"
end
app.ssh.username = "vagrant"
end
end