forked from energicryptocurrency/gen2-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
19 lines (16 loc) · 721 Bytes
/
Vagrantfile
File metadata and controls
19 lines (16 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Vagrant.configure("2") do |config|
config.vm.define 'db' do |node|
node.vm.provider "virtualbox" do |v|
v.memory = 256
end
node.vm.box = "bento/ubuntu-18.04"
node.vm.network "forwarded_port", guest: 27017, host: 27017, host_ip: "127.0.0.1"
node.vm.provision "shell", inline: %Q[
apt-get install -y mongodb-server;
/bin/echo -e 'use blockex\n db.createUser( { user: "blockexuser", pwd: "blockex", roles: [ "readWrite" ] } ) ' | mongo;
echo 'auth = true' >> /etc/mongodb.conf;
sed -i 's/bind_ip = 127.0.0.1/bind_ip = 0.0.0.0/g' /etc/mongodb.conf;
systemctl restart mongodb.service;
]
end
end