Add a passthru make target for running dokku commands within the vagrant vm
This commit is contained in:
1 parent
14145eebb1
commit
ab44c915a8
1 file changed
+11
-1
@@ -6,7 +6,15 @@ STACK_URL ?= https://github.com/progrium/buildstep.git
|
|||||||
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-03-08/2014-03-08_429d4a9deb.tar.gz
|
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-03-08/2014-03-08_429d4a9deb.tar.gz
|
||||||
DOKKU_ROOT ?= /home/dokku
|
DOKKU_ROOT ?= /home/dokku
|
||||||
|
|
||||||
.PHONY: all install copyfiles version plugins dependencies sshcommand pluginhook docker aufs stack count acl-add
|
# If the first argument is "dokku"...
|
||||||
|
ifeq (dokku,$(firstword $(MAKECMDGOALS)))
|
||||||
|
# use the rest as arguments for "dokku"
|
||||||
|
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||||
|
# ...and turn them into do-nothing targets
|
||||||
|
$(eval $(RUN_ARGS):;@:)
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: all install copyfiles version plugins dependencies sshcommand pluginhook docker aufs stack count acl-add dokku
|
||||||
|
|
||||||
all:
|
all:
|
||||||
# Type "make install" to install.
|
# Type "make install" to install.
|
||||||
@@ -75,3 +83,5 @@ count:
|
|||||||
acl-add:
|
acl-add:
|
||||||
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
|
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
|
||||||
|
|
||||||
|
dokku:
|
||||||
|
vagrant ssh -- "sudo -H -u root bash -c 'dokku $(RUN_ARGS)'"
|
||||||
Reference in new issue
Block a user