forked from adsabs/ADSOrcid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
68 lines (57 loc) · 2.56 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# NOTE: this Vagrant file will work on linux; for all other machines
# Vagrant is starting a proxy VM and that machine will not be forwarding
# ports properly. try to run it as: FORWARD_DOCKER_PORTS='true' vagrant up
Vagrant.configure("2") do |config|
#TODO: mount the folder as the user that owns the repo
config.vm.synced_folder ".", "/vagrant", owner: 1000, group: 130
config.vm.define "app" do |app|
app.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.build_dir = "manifests/development/app"
d.has_ssh = true
d.name = "app"
d.create_args = ["--add-host", "dockerhost:" + `ip route | grep docker0 | grep -E -o ' [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'`.strip]
end
end
config.vm.define "db" do |app|
app.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.build_dir = "manifests/development/db"
d.has_ssh = true
d.name = "db"
d.ports = ["37017:27017", "6432:5432"]
#d.volumes = ["data/postgres:/var/lib/postgresql/data", "data/mongodb:/data/db"]
d.create_args = ["--add-host", "dockerhost:" + `ip route | grep docker0 | grep -E -o ' [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'`.strip]
end
end
config.vm.define "rabbitmq" do |app|
app.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.build_dir = "manifests/development/rabbitmq"
d.has_ssh = true
d.name = "rabbitmq"
d.ports = ["6672:5672", "25672:15672"]
d.create_args = ["--add-host", "dockerhost:" + `ip route | grep docker0 | grep -E -o ' [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'`.strip]
end
end
config.vm.define "imp" do |app|
app.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.build_dir = "manifests/development/import-pipeline"
d.has_ssh = true
d.name = "imp"
d.create_args = ["--add-host", "dockerhost:" + `ip route | grep docker0 | grep -E -o ' [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'`.strip]
end
end
config.ssh.username = "root"
config.ssh.private_key_path = "insecure_key"
config.vm.define "prod" do |prod|
prod.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init"]
d.build_dir = "manifests/production/app"
d.has_ssh = false
d.name = "ADSOrcid"
d.remains_running = true
end
end
end