From 1fe4f5e72f5a5b94c62828eff4ae1bf895ba30f1 Mon Sep 17 00:00:00 2001 From: Stafford Brunk Date: Tue, 29 Oct 2013 14:44:48 -0600 Subject: [PATCH 1/2] Add a dependencies hook for plugin dependency management --- Makefile | 5 ++++- dokku | 4 ++++ plugins/nginx-vhosts/dependencies | 6 ++++++ plugins/nginx-vhosts/install | 5 ----- 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100755 plugins/nginx-vhosts/dependencies diff --git a/Makefile b/Makefile index 2cf37f41eb2..ca59d0a32f8 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,16 @@ PREBUILT_STACK_URL ?= https://s3.amazonaws.com/progrium-dokku/progrium_buildstep all: # Type "make install" to install. -install: dependencies stack copyfiles plugins +install: dependencies stack copyfiles plugin-dependencies plugins copyfiles: cp dokku /usr/local/bin/dokku mkdir -p /var/lib/dokku/plugins cp -r plugins/* /var/lib/dokku/plugins +plugin-dependencies: pluginhook + dokku plugins-install-dependencies + plugins: pluginhook docker dokku plugins-install diff --git a/dokku b/dokku index 65db0ea52d2..a23b62f76f1 100755 --- a/dokku +++ b/dokku @@ -84,6 +84,10 @@ case "$1" in pluginhook install ;; + plugins-install-dependencies) + pluginhook dependencies + ;; + # temporary hack for https://github.com/progrium/dokku/issues/82 deploy:all) for app in $(ls -d $DOKKU_ROOT/*/); do diff --git a/plugins/nginx-vhosts/dependencies b/plugins/nginx-vhosts/dependencies new file mode 100755 index 00000000000..7897b65ca72 --- /dev/null +++ b/plugins/nginx-vhosts/dependencies @@ -0,0 +1,6 @@ +#!/bin/bash + +# latest stable NGINX 1.4.x with websocket support +add-apt-repository -y ppa:nginx/stable +apt-get update +apt-get install -y nginx dnsutils diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index a2492aa68ac..a381bdd71cc 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -1,10 +1,5 @@ #!/bin/bash -# latest stable NGINX 1.4.x with websocket support -add-apt-repository -y ppa:nginx/stable -apt-get update -apt-get install -y nginx dnsutils - if ! grep -q dokku-nginx-reload "/etc/sudoers"; then touch /etc/sudoers.tmp cp /etc/sudoers /tmp/sudoers.new From aa6054318ef3d649c50177a9b907d183f98ee3c6 Mon Sep 17 00:00:00 2001 From: Stafford Brunk Date: Tue, 29 Oct 2013 16:43:34 -0600 Subject: [PATCH 2/2] Fix final key upload message to be inline with README --- bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 5f145ec9517..1e3e5eaed46 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,4 +19,4 @@ make install echo echo "Be sure to upload a public key for your user:" -echo " cat ~/.ssh/id_rsa.pub | ssh root@$HOSTNAME \"gitreceive upload-key progrium\"" +echo " cat ~/.ssh/id_rsa.pub | ssh $HOSTNAME \"sudo sshcommand acl-add dokku progrium\""