move pups into image
authorSam Saffron <sam.saffron@gmail.com>
Mon, 4 Nov 2013 00:45:32 +0000 (16:45 -0800)
committerSam Saffron <sam.saffron@gmail.com>
Mon, 4 Nov 2013 00:45:32 +0000 (16:45 -0800)
.gitignore
image/Dockerfile
launcher

index c61ca8fa28eb63d0b22cc8225a053fb3b0fa4267..15c4e91991733a74d9b3a95e0cdd38cd8db33412 100644 (file)
@@ -1,4 +1,4 @@
 shared/pups
 *.swp
 cids/*
-shared/config/web1/conf.yml
+*.yml
index fa54e90f6055a6a5a30d61d8b8ab71c25dbc9cd9..a4995d19a49569831e8b986f7f80d5e12504fe55 100644 (file)
@@ -44,6 +44,8 @@ RUN apt-get -y update &&\
     apt-get install -y runit &&\
     locale-gen en_US
 
+RUN cd / && git clone https://github.com/SamSaffron/pups.git
+
 # RUN cd /var/www/discourse && bundle exec rake db:test:prepare && bundle exec rspec
 
 # mkdir -p /src/godeb && cd /src/godeb && curl -O https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz &&\
index 5f9e37f20e8c487e1675240a6a7ccb9b39d2e973..ed896a1cc8bdeb5a5d9bd9dce95a117a8bca6d0e 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -2,7 +2,7 @@
 
 command=$1
 config=$2
-config_file=shared/config/"$config"/conf.yml
+config_file="$config".yml
 cidfile=cids/"$config".cid
 cidbootstrap=cids/"$config"_boostrap.cid
 
@@ -33,7 +33,8 @@ fi
 
 case "$command" in
   bootstrap)
-      docker run -cidfile $cidbootstrap -i -t -v `pwd`/shared:/shared samsaffron/discourse /shared/pups/bin/pups /$config_file
+      exec cat $config_file | docker run -cidfile $cidbootstrap -i -a stdin -a stdout -a stderr -v `pwd`/shared:/shared samsaffron/discourse /pups/bin/pups --stdin
+      sleep 5
       docker commit `cat $cidbootstrap` samsaffron/discourse $config
       docker rm `cat $cidbootstrap` && rm $cidbootstrap
       exit 0