mirror of
https://github.com/dokku/dokku.git
synced 2026-02-23 19:50:34 +01:00
Add a passthru make target for running dokku commands within the vagrant vm
This commit is contained in:
12
Makefile
12
Makefile
@@ -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
|
||||
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:
|
||||
# Type "make install" to install.
|
||||
@@ -75,3 +83,5 @@ count:
|
||||
acl-add:
|
||||
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