dokkufy 0.0.7 → 0.1.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 +43 -5
- data/bin/dokku +9 -0
- data/lib/dokkufy/app.rb +1 -0
- data/lib/dokkufy/dokku.rb +33 -0
- data/lib/dokkufy/info.rb +1 -1
- data/lib/dokkufy.rb +1 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a5fbd971614a49e1d38fb65cee53959a32ad8e9
|
4
|
+
data.tar.gz: 82891b6ff6a0284dc896f6912b25e5b00bb0870b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 331c2434da0c75e00f9d5004adae4cafacb53e6868a111d9f6f27ef6a66dd0520ff65ed06927162237659c8ca6cc5cef631522e239a6352bc969fac61c8fa16d
|
7
|
+
data.tar.gz: 391d73568f03cf840190a58941bea2cc47aeff03b9a1f83c4914be2efd8bf0aff2c14aa48feee861ce6894d28c12901c05e0832079efa88241c75f03e645f376
|
data/README.md
CHANGED
@@ -2,7 +2,20 @@
|
|
2
2
|
|
3
3
|
A [Dokku](https://github.com/progrium/dokku) toolbelt inspired by the [Heroku toolbelt](https://toolbelt.heroku.com/)
|
4
4
|
|
5
|
-
##
|
5
|
+
## Basic usage
|
6
|
+
|
7
|
+
Want to build your own Heroku? Dokku and Dokkufy make this possible.
|
8
|
+
|
9
|
+
1. Spin up a Ubuntu 12.04 or 14.04 server
|
10
|
+
2. Dokkufy your server using `dokkufy server`
|
11
|
+
3. Change directories to your app
|
12
|
+
4. Dokkufy your app `dokkufy app`
|
13
|
+
5. Deploy your app `git push dokku master`
|
14
|
+
6. Control your app using the `dokku` command (see `dokku help` for available commands)
|
15
|
+
|
16
|
+
## Commands
|
17
|
+
|
18
|
+
Most commands take their parameters as command line arguments or through an interactive prompt.
|
6
19
|
|
7
20
|
```
|
8
21
|
dokkufy <command>
|
@@ -18,10 +31,6 @@ dokkufy <command>
|
|
18
31
|
dokku <command> runs dokku commands on the server attached to this app
|
19
32
|
```
|
20
33
|
|
21
|
-
## Implemented commands
|
22
|
-
|
23
|
-
Most commands take their parameters as command line arguments or through an interactive prompt.
|
24
|
-
|
25
34
|
### dokkufy server
|
26
35
|
|
27
36
|
```sh
|
@@ -74,8 +83,37 @@ dokkufy app:clear
|
|
74
83
|
|
75
84
|
Removes any `dokku` remotes for the local git repository and deletes the `.dokkurc` file.
|
76
85
|
|
86
|
+
### dokku
|
87
|
+
|
88
|
+
```sh
|
89
|
+
dokku <command>
|
90
|
+
```
|
91
|
+
|
92
|
+
Runs the command on the Dokku server attached to this app. Intelligently determines the remote address if the app has been dokkufied, and automatically adds the app name where needed.
|
93
|
+
|
94
|
+
Some examples:
|
95
|
+
|
96
|
+
```sh
|
97
|
+
dokku help # runs `dokku help` on server
|
98
|
+
dokku run ls # runs `dokku run <app_name> ls` on server
|
99
|
+
```
|
100
|
+
|
101
|
+
Every `dokku` command translates to an auto generated ssh call. The `<app_name>` is automatically added if the response returns a "App <command> not found".
|
102
|
+
|
103
|
+
Some examples
|
104
|
+
|
105
|
+
```sh
|
106
|
+
cat .dokkurc # content of the .dokkurc
|
107
|
+
$ dokku@example.com:test_app
|
108
|
+
dokku help
|
109
|
+
$ ssh -t dokku@example.com help # the actual command executed
|
110
|
+
dokku run ls # a command that requires an app name
|
111
|
+
$ ssh -t dokku@example.com run test_app ls
|
112
|
+
```
|
113
|
+
|
77
114
|
## Release notes
|
78
115
|
|
116
|
+
* **0.1.0** Adds the `dokku` command
|
79
117
|
* **0.0.7** Adds the (un)dokkufication of apps
|
80
118
|
* **0.0.6** Adds plugin uninstall
|
81
119
|
* **0.0.5** Small bug fix to plugin installs
|
data/bin/dokku
ADDED
data/lib/dokkufy/app.rb
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
module Dokkufy
|
2
|
+
class Dokku
|
3
|
+
attr_accessor :repo
|
4
|
+
|
5
|
+
def initialize repo
|
6
|
+
self.repo = repo
|
7
|
+
end
|
8
|
+
|
9
|
+
def run args
|
10
|
+
output = `#{command(args)}`
|
11
|
+
if output.strip.end_with?("does not exist")
|
12
|
+
args = args.insert(1,app_name)
|
13
|
+
output = `#{command(args)}`
|
14
|
+
end
|
15
|
+
puts output
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def command args
|
21
|
+
command = "ssh -t -q #{server} #{args.join(" ")}"
|
22
|
+
end
|
23
|
+
|
24
|
+
def server
|
25
|
+
@server ||= self.repo.split(":").first
|
26
|
+
end
|
27
|
+
|
28
|
+
def app_name
|
29
|
+
@app_name ||= self.repo.split(":").last
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
data/lib/dokkufy/info.rb
CHANGED
data/lib/dokkufy.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokkufy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristiano Betta
|
@@ -56,6 +56,7 @@ description: A Dokku toolchain
|
|
56
56
|
email:
|
57
57
|
- cbetta@gmail.com
|
58
58
|
executables:
|
59
|
+
- dokku
|
59
60
|
- dokkufy
|
60
61
|
extensions: []
|
61
62
|
extra_rdoc_files: []
|
@@ -66,10 +67,12 @@ files:
|
|
66
67
|
- LICENSE
|
67
68
|
- README.md
|
68
69
|
- Rakefile
|
70
|
+
- bin/dokku
|
69
71
|
- bin/dokkufy
|
70
72
|
- dokkufy.gemspec
|
71
73
|
- lib/dokkufy.rb
|
72
74
|
- lib/dokkufy/app.rb
|
75
|
+
- lib/dokkufy/dokku.rb
|
73
76
|
- lib/dokkufy/git.rb
|
74
77
|
- lib/dokkufy/info.rb
|
75
78
|
- lib/dokkufy/plugin.rb
|