adding vagrant and docker files

This commit is contained in:
Mike McCabe
2014-09-18 18:53:30 -06:00
parent ca11cabadd
commit 0dcadb6f00
4 changed files with 40 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
FROM rails:onbuild
MAINTAINER mccabe615
ADD script/start /start
RUN chmod a+x /start
user root
ENV RAILS_ENV development
CMD /start
Vendored
+13
View File
@@ -0,0 +1,13 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "web" do |web|
web.vm.provider "docker" do |d|
config.vm.box = "hashicorp/precise64"
d.image = "mccabe615/railsgoat"
d.name = "web"
d.ports = ["3000:3000"]
d.vagrant_vagrantfile = "./Vagrantfile.proxy"
end
end
end
+10
View File
@@ -0,0 +1,10 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.provision "docker"
config.vm.provision "shell", inline:
"ps aux | grep 'sshd:' | awk '{print $2}' | xargs kill"
config.vm.network :forwarded_port, guest: 3000, host: 3000
end
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
set -e
rake db:setup
rails server