Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vagrant.configure("2") do |config|
- config.vm.box = "ubuntu/trusty64"
- # Create a forwarded port mapping which allows access to a specific port
- # within the machine from a port on the host machine and only allow access
- # via 127.0.0.1 to disable public access
- config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip: "127.0.0.1"
- # Share an additional folder to the guest VM. The first argument is
- # the path on the host to the actual folder. The second argument is
- # the path on the guest to mount the folder. And the optional third
- # argument is a set of non-required options.
- config.vm.synced_folder '.', '/workspace'
- # Provider-specific configuration so you can fine-tune various
- # backing providers for Vagrant. These expose provider-specific options.
- # Example for VirtualBox:
- #
- config.vm.provider "virtualbox" do |vb|
- vb.cpus = 1
- vb.memory = "512"
- end
- config.vm.provision "docker" do |d|
- d.run "redis",
- args: "-p 6379:6379"
- d.run "postgis",
- image: "mdillon/postgis:9.5",
- args: "-p 5432:5432 "\
- "-e POSTGRES_PASSWORD=datahub "\
- "-e POSTGRES_USER=datahub "\
- "-e POSTGRES_DB=datahub_development "
- end
- config.vm.provision "shell", inline: <<-SHELL
- sudo apt-get update
- # Install build dependencies
- sudo apt-get install -y \
- autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev \
- zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev \
- libpq-dev postgresql-client git-core
- SHELL
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement