Advertisement
Guest User

Untitled

a guest
Oct 8th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. Vagrant.configure("2") do |config|
  2. config.vm.box = "ubuntu/trusty64"
  3.  
  4. # Create a forwarded port mapping which allows access to a specific port
  5. # within the machine from a port on the host machine and only allow access
  6. # via 127.0.0.1 to disable public access
  7. config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip: "127.0.0.1"
  8.  
  9. # Share an additional folder to the guest VM. The first argument is
  10. # the path on the host to the actual folder. The second argument is
  11. # the path on the guest to mount the folder. And the optional third
  12. # argument is a set of non-required options.
  13. config.vm.synced_folder '.', '/workspace'
  14.  
  15. # Provider-specific configuration so you can fine-tune various
  16. # backing providers for Vagrant. These expose provider-specific options.
  17. # Example for VirtualBox:
  18. #
  19. config.vm.provider "virtualbox" do |vb|
  20. vb.cpus = 1
  21. vb.memory = "512"
  22. end
  23.  
  24. config.vm.provision "docker" do |d|
  25. d.run "redis",
  26. args: "-p 6379:6379"
  27.  
  28. d.run "postgis",
  29. image: "mdillon/postgis:9.5",
  30. args: "-p 5432:5432 "\
  31. "-e POSTGRES_PASSWORD=datahub "\
  32. "-e POSTGRES_USER=datahub "\
  33. "-e POSTGRES_DB=datahub_development "
  34. end
  35.  
  36. config.vm.provision "shell", inline: <<-SHELL
  37. sudo apt-get update
  38.  
  39. # Install build dependencies
  40. sudo apt-get install -y \
  41. autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev \
  42. zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev \
  43. libpq-dev postgresql-client git-core
  44. SHELL
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement