Class: DokkuClient::Plugins::Mongodb
- Inherits:
-
Base
- Object
- Base
- DokkuClient::Plugins::Mongodb
show all
- Defined in:
- lib/dokku_client/plugins/mongodb.rb
Constant Summary
Constants inherited
from Base
Base::GIT_DIR, Base::KEYS_AND_QUESTIONS
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#common_description, #dokku, #git_directory_present?, #initialize, #plugin_enabled, #reconfig
Instance Method Details
#commands(opts) ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 36
def commands opts
if plugin_enabled('mongodb')
opts.separator "\n MongoDB commands:"
opts.separator " mongodb:create create a mongo database"
opts.separator " mongodb:delete delete a mongo database"
opts.separator " mongodb:console lunch mongodb console as admin"
opts.separator " mongodb:link link mongo container to application"
opts.separator " mongodb:logs display logs for mongo container"
opts.separator " mongodb:list list all mongo databases"
opts.separator " mongodb:status display status of mongo container"
end
end
|
#console_mongodb ⇒ Object
12
13
14
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 12
def console_mongodb
dokku "mongodb:console"
end
|
#create_mongodb ⇒ Object
8
9
10
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 8
def create_mongodb
dokku "mongodb:create #{@options["project-name"]}"
end
|
#delete_mongodb ⇒ Object
16
17
18
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 16
def delete_mongodb
dokku "mongodb:delete #{@options["project-name"]}"
end
|
#link_mongodb ⇒ Object
28
29
30
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 28
def link_mongodb
dokku "mongodb:link #{@options["project-name"]}"
end
|
#list_mongodb ⇒ Object
20
21
22
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 20
def list_mongodb
dokku "mongodb:list"
end
|
#logs_mongodb ⇒ Object
24
25
26
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 24
def logs_mongodb
dokku "mongodb:logs"
end
|
#run ⇒ Object
5
6
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 5
def run
end
|
#status_mongodb ⇒ Object
32
33
34
|
# File 'lib/dokku_client/plugins/mongodb.rb', line 32
def status_mongodb
dokku "mongodb:status"
end
|