dokku-cli 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -2
- data/lib/dokku_cli.rb +6 -1
- data/lib/dokku_cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 206038795a0a8a9922b75ab326d425f309d0f46d
|
4
|
+
data.tar.gz: 58e8ffaf8478808bf7cb5102ad132bdfec7727b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f621f11719d16baad5f3a9c846ef72965427e73a2b584b8d183e70505cf034a6a458eff1bb41912d313c5c88443a5083563ccff9441d2af4ce988f2e3cafd30c
|
7
|
+
data.tar.gz: d91eb52374131d80a6205b9998e3fe30a0ffc97a321066ce1b565562cd55c37ee25f5a4c090173e947e8102e54ddf30224006877e644bf4f9e096c9745ea4232
|
data/README.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# Dokku CLI :anchor:
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/dokku-cli.svg)](http://badge.fury.io/rb/dokku-cli)
|
4
|
+
[![Downloads](http://ruby-gem-downloads-badge.herokuapp.com/dokku-cli?type=total)](http://badge.fury.io/rb/dokku-cli)
|
5
|
+
|
3
6
|
Dokku CLI is a zero config command line tool for the official version of [Dokku](https://github.com/progrium/dokku).
|
4
7
|
|
5
8
|
The newest version of Dokku CLI is fully compatible with ```Dokku 0.3.x```
|
6
9
|
|
7
|
-
This project is a fork of [brianpattison/dokku-installer-cli](https://github.com/brianpattison/dokku-installer-cli).
|
10
|
+
This project is a fork of [brianpattison/dokku-installer-cli](https://github.com/brianpattison/dokku-installer-cli).
|
8
11
|
|
9
12
|
## Installation
|
10
13
|
```
|
@@ -13,7 +16,43 @@ $ gem install dokku-cli
|
|
13
16
|
|
14
17
|
## Usage
|
15
18
|
|
16
|
-
Dokku CLI reads the domain of your Dokku server from your git
|
19
|
+
Dokku CLI reads the domain of your Dokku server from your git remote called dokku and requires no configuration. Change in your application directory and run ``dokku``
|
20
|
+
|
21
|
+
|
22
|
+
## Remote Commands
|
23
|
+
|
24
|
+
```
|
25
|
+
dokku run <cmd> # Run a one-off command in the environment of the app
|
26
|
+
```
|
27
|
+
|
28
|
+
## Configuration Management
|
29
|
+
|
30
|
+
```
|
31
|
+
dokku config # Display the app's environment variables
|
32
|
+
dokku config:get KEY # Display an environment variable value
|
33
|
+
dokku config:set KEY1=VALUE1 [KEY2=VALUE2 ...] # Set one or more environment variables
|
34
|
+
dokku config:set:file <path/to/file> # Set one or more environment variables from file
|
35
|
+
dokku config:unset KEY1 [KEY2 ...] # Unset one or more environment variables
|
36
|
+
```
|
37
|
+
|
38
|
+
## Process/Container Management
|
39
|
+
|
40
|
+
```
|
41
|
+
dokku ps # List processes running in app container(s)
|
42
|
+
dokku ps:rebuild # Rebuild the app
|
43
|
+
dokku ps:restart # Restart the app container
|
44
|
+
dokku ps:start # Start the app container
|
45
|
+
```
|
46
|
+
|
47
|
+
## Multiple Remote Apps/Servers (e.g. Staging)
|
48
|
+
|
49
|
+
You can use the global option ``--remote`` to run commands on a different server/app from a remote branch. For more details see [heroku's guide](https://devcenter.heroku.com/articles/multiple-environments) for multiple environments for an app.
|
50
|
+
|
51
|
+
```
|
52
|
+
dokku run rails c --remote staging
|
53
|
+
```
|
54
|
+
|
55
|
+
## All commands
|
17
56
|
|
18
57
|
```
|
19
58
|
$ dokku help
|
data/lib/dokku_cli.rb
CHANGED
@@ -8,6 +8,8 @@ require "dokku_cli/ps"
|
|
8
8
|
|
9
9
|
module DokkuCli
|
10
10
|
class Cli < Thor
|
11
|
+
class_option :remote
|
12
|
+
|
11
13
|
desc "logs [-t]", "Display logs for the app (-t follows)"
|
12
14
|
def logs(*args)
|
13
15
|
if args.first && args.first.strip == "-t"
|
@@ -81,12 +83,15 @@ module DokkuCli
|
|
81
83
|
end
|
82
84
|
|
83
85
|
def git_config_match
|
86
|
+
remote = "dokku"
|
87
|
+
remote = options[:remote] if options[:remote]
|
88
|
+
|
84
89
|
@git_config_match ||= begin
|
85
90
|
git_config = File.join(Dir.pwd, ".git", "config")
|
86
91
|
exit unless File.exist?(git_config)
|
87
92
|
|
88
93
|
git_config = File.read(git_config)
|
89
|
-
match = git_config.match(
|
94
|
+
match = git_config.match(/\[remote "#{remote}"\]\n\turl \= dokku@(.*):(.*)\n/).to_a
|
90
95
|
exit unless match
|
91
96
|
|
92
97
|
match
|
data/lib/dokku_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokku-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Szturo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.4.
|
82
|
+
rubygems_version: 2.4.6
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Command line tool for Dokku.
|