dokuen 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/bin/dokuen_install_launchdaemon +10 -0
- data/bin/dokuen_restart_nginx +6 -0
- data/lib/dokuen/cli.rb +0 -20
- data/lib/dokuen/deploy.rb +2 -2
- data/lib/dokuen/version.rb +1 -1
- metadata +6 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Dokuen, a Personal App Platform
|
2
2
|
|
3
|
-
Dokuen is a "personal app platform". It's the same idea as all of these PaaS and IaaS services out there, except you host it on your own machine. It's specifically for hosting multiple 12-factor applications on one Mac.
|
3
|
+
Dokuen is a "personal app platform". It's the same idea as all of these PaaS and IaaS services out there, except you host it on your own machine. It's specifically for hosting multiple 12-factor applications on one Mac. [Here](http://bugsplat.info/2012-05-17-dokuen-a-personal-app-platform.html) is an article that explains my motivations.
|
4
4
|
|
5
5
|
## Requirements
|
6
6
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'dokuen'
|
5
|
+
|
6
|
+
name = File.basename(ARGV[0])
|
7
|
+
|
8
|
+
Dokuen.sys("cp #{ARGV[0]} /Library/LaunchDaemons")
|
9
|
+
Dokuen.sys("launchctl unload -wF /Library/LaunchDaemons/#{name}")
|
10
|
+
Dokuen.sys("launchctl load -wF /Library/LaunchDaemons/#{name}")
|
data/lib/dokuen/cli.rb
CHANGED
@@ -141,26 +141,6 @@ HERE
|
|
141
141
|
puts "App #{app} deployed"
|
142
142
|
end
|
143
143
|
|
144
|
-
desc "restart_nginx", "Restart Nginx", :hide => true
|
145
|
-
def restart_nginx
|
146
|
-
raise "Must be run as root" unless Process.uid == 0
|
147
|
-
Dokuen.sys("/usr/local/sbin/nginx -s reload")
|
148
|
-
end
|
149
|
-
|
150
|
-
desc "install_launchdaemon [PATH]", "Install a launch daemon", :hide => true
|
151
|
-
def install_launchdaemon(path)
|
152
|
-
raise "Must be run as root" unless Process.uid == 0
|
153
|
-
basename = File.basename(path)
|
154
|
-
destpath = "/Library/LaunchDaemons/#{basename}"
|
155
|
-
|
156
|
-
if File.exists?(destpath)
|
157
|
-
Dokuen.sys("launchctl unload -wF #{destpath}")
|
158
|
-
end
|
159
|
-
|
160
|
-
Dokuen.sys("cp #{path} #{destpath}")
|
161
|
-
Dokuen.sys("launchctl load -wF #{destpath}")
|
162
|
-
end
|
163
|
-
|
164
144
|
desc "run_command [APP]", "Run a command in the given app's environment"
|
165
145
|
method_option :command, :aliases => '-C', :desc => "Command to run"
|
166
146
|
def run_command(app="")
|
data/lib/dokuen/deploy.rb
CHANGED
@@ -73,7 +73,7 @@ module Dokuen
|
|
73
73
|
File.open(plist_path, "w+") do |f|
|
74
74
|
f.write(t.result(binding))
|
75
75
|
end
|
76
|
-
Dokuen.sys("sudo /usr/local/bin/
|
76
|
+
Dokuen.sys("sudo /usr/local/bin/dokuen_install_launchdaemon #{plist_path}")
|
77
77
|
end
|
78
78
|
|
79
79
|
def install_nginx_conf
|
@@ -81,7 +81,7 @@ module Dokuen
|
|
81
81
|
File.open(File.join(nginx_dir, "#{@app}.#{base_domain}.conf"), "w+") do |f|
|
82
82
|
f.write(t.result(binding))
|
83
83
|
end
|
84
|
-
Dokuen.sys("sudo /usr/local/bin/
|
84
|
+
Dokuen.sys("sudo /usr/local/bin/dokuen_restart_nginx")
|
85
85
|
end
|
86
86
|
|
87
87
|
def base_domain
|
data/lib/dokuen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokuen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-21 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -79,6 +79,8 @@ description: Like Heroku but Personal
|
|
79
79
|
email: pete@bugsplat.info
|
80
80
|
executables:
|
81
81
|
- dokuen
|
82
|
+
- dokuen_install_launchdaemon
|
83
|
+
- dokuen_restart_nginx
|
82
84
|
extensions: []
|
83
85
|
extra_rdoc_files: []
|
84
86
|
files:
|
@@ -87,6 +89,8 @@ files:
|
|
87
89
|
- README.md
|
88
90
|
- Rakefile
|
89
91
|
- bin/dokuen
|
92
|
+
- bin/dokuen_install_launchdaemon
|
93
|
+
- bin/dokuen_restart_nginx
|
90
94
|
- dokuen.gemspec
|
91
95
|
- lib/dokuen.rb
|
92
96
|
- lib/dokuen/cli.rb
|