From bd93f1c6c004677118208d3bc1e031c05d13e8c2 Mon Sep 17 00:00:00 2001 From: Alfredo Baldoceda Date: Mon, 21 Sep 2015 17:51:33 -0700 Subject: [PATCH] Vagranfile added for vagrant --- .gitignore | 3 ++- README.md | 3 ++- Vagrantfile | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index eb763aa..69c67f8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node/node_modules .DS_Store -node/npm-debug.log \ No newline at end of file +node/npm-debug.log +.vagrant diff --git a/README.md b/README.md index 1ceda94..3edf27f 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,5 @@ For a detailed explanation of the workflow used in this repository, refer to [th For a detailed overview of Containers and Docker, refer to [this post from my blog](http://anandmanisankar.com/posts/container-docker-PaaS-microservices/): [http://anandmanisankar.com/posts/container-docker-PaaS-microservices/](http://anandmanisankar.com/posts/container-docker-PaaS-microservices/) - +A Vagrantfile has been added for developing purposes, just install vagrant and run "vagrant up": +[https://www.vagrantup.com/downloads.html](https://www.vagrantup.com/downloads.html) diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..65eae86 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,20 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +unless Vagrant.has_plugin?("vagrant-docker-compose") + system("vagrant plugin install vagrant-docker-compose") + puts "Dependencies installed, please try the command again." + exit +end + +Vagrant.configure("2") do |config| + config.vm.box = "ubuntu/trusty64" + #config.vm.box = "box-cutter/centos70-docker" + + config.vm.network(:forwarded_port, guest: 80, host: 9080) + + config.vm.provision :shell, inline: "apt-get update" + #config.vm.provision :shell, inline: "yum clean all; yum makecache fast; yum -y update" + config.vm.provision :docker + config.vm.provision :docker_compose, yml: "/vagrant/docker-compose.yml", rebuild: true, project_name: "myproject", run: "always" +end