diff --git a/.gitignore b/.gitignore index 8000dd9db..2647fa47b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vagrant +.DS_Store diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2890340b8..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "buildstep"] - path = buildstep - url = https://github.com/progrium/buildstep.git diff --git a/Makefile b/Makefile index c8806c824..94069a7c9 100644 --- a/Makefile +++ b/Makefile @@ -7,15 +7,11 @@ install: submodule gitreceive sshcommand cp dokku /usr/local/bin/dokku cp receiver /home/git/receiver cp deploystep /home/git/deploystep - cp buildstep/buildstep /home/git/buildstep + cp buildstep /home/git/buildstep cp nginx-app-conf /home/git/nginx-app-conf cp nginx-reloader.conf /etc/init/nginx-reloader.conf echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf -submodule: - git submodule init - git submodule update - gitreceive: wget -qO /usr/local/bin/gitreceive ${GITRECEIVE_URL} chmod +x /usr/local/bin/gitreceive @@ -27,4 +23,4 @@ sshcommand: sshcommand create dokku /usr/local/bin/dokku count: - cat receiver deploystep bootstrap.sh nginx-app-conf nginx-reloader.conf | wc -l \ No newline at end of file + cat receiver deploystep buildstep bootstrap.sh nginx-app-conf nginx-reloader.conf | wc -l \ No newline at end of file diff --git a/README.md b/README.md index f3cde0836..042d0f49c 100644 --- a/README.md +++ b/README.md @@ -69,13 +69,6 @@ To update the deploy step (this is updated less frequently): $ cd ~/dokku $ git pull origin master $ sudo make install - -More frequently, the build step is updated. This is where the app "stack" lives and where buildpacks -are supported. You can update this by running: - - $ cd ~/dokku/buildstep - $ git pull origin master - $ sudo make build Nothing needs to be restarted. Changes will take effect on the next push / deployment. diff --git a/bootstrap.sh b/bootstrap.sh index 639e8c9b7..4a1478ac7 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -15,11 +15,7 @@ sed -i.bak 's/docker -d/docker -d -r=true/' /etc/init/docker.conf # Docker shoul cd ~ && git clone ${DOKKU_REPO} cd dokku && make install -if [[ $DOKKU_STACK ]]; then - curl "$DOKKU_STACK" | gunzip -cd | docker import - progrium/buildstep -else - cd buildstep && make build -fi +curl "$DOKKU_STACK" | gunzip -cd | docker import - progrium/buildstep [[ -f /etc/nginx/nginx.conf ]] && sed -i 's/# server_names_hash_bucket_size/server_names_hash_bucket_size/' /etc/nginx/nginx.conf diff --git a/buildstep b/buildstep deleted file mode 160000 index 7b0d89fd0..000000000 --- a/buildstep +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7b0d89fd0b8729b42e78e4c595241e611254d0d5 diff --git a/buildstep b/buildstep new file mode 100755 index 000000000..49565f942 --- /dev/null +++ b/buildstep @@ -0,0 +1,14 @@ +#!/bin/bash +set -e +NAME="$1" + +# Place the app inside the container +ID=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app") +test $(docker wait $ID) -eq 0 +docker commit $ID $NAME > /dev/null + +# Run the builder script and attach to view output +ID=$(docker run -d $NAME /build/builder) +docker attach $ID +test $(docker wait $ID) -eq 0 +docker commit $ID $NAME > /dev/null