orats 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/orats/commands/new/rails.rb +12 -0
- data/lib/orats/templates/includes/new/rails/.env +7 -4
- data/lib/orats/templates/includes/new/rails/config/puma.rb +6 -4
- data/lib/orats/templates/includes/new/rails/config/sidekiq.yml +1 -1
- data/lib/orats/templates/includes/new/rails/config/unicorn.rb +5 -4
- data/lib/orats/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98a4802b7b1d109d7bd50407c2fb82082a0fd51c
|
4
|
+
data.tar.gz: 26e2ff60d48cd9b36b884c4dd1bf15ff22d1a94b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd92db4f7de6310a1da383eff6bcbe9e8cccd4a672adad6da092d434d8a0c59cb5f4bf8f9640f108de81bb2ff22682d37351fd9a67f0f7e42249a81504661910
|
7
|
+
data.tar.gz: 8bcbffa756969375179cf174002003bb7f5c6ab07377b0d53f702e2e9a6c191b469f106508bc443157bcd9d0b093a48d726e9ef4a69dc40127b4a0226ce997e6
|
@@ -38,6 +38,7 @@ module Orats
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def rails_template_actions
|
41
|
+
create_env_paths
|
41
42
|
gsub_postgres_info
|
42
43
|
gsub_redis_info
|
43
44
|
gsub_readme
|
@@ -52,6 +53,17 @@ module Orats
|
|
52
53
|
generate_favicons
|
53
54
|
end
|
54
55
|
|
56
|
+
def create_env_paths
|
57
|
+
task 'Create the log and run state paths'
|
58
|
+
|
59
|
+
service = File.basename(@target_path)
|
60
|
+
paths = "log/#{service} tmp/#{service} log/sidekiq tmp/sidekiq"
|
61
|
+
|
62
|
+
run_from @target_path, "mkdir #{paths}"
|
63
|
+
|
64
|
+
commit 'Add log and run state paths'
|
65
|
+
end
|
66
|
+
|
55
67
|
def gsub_postgres_info
|
56
68
|
task 'Update the DATABASE_URL'
|
57
69
|
|
@@ -36,17 +36,20 @@ THREADS_MIN: 0
|
|
36
36
|
THREADS_MAX: 1
|
37
37
|
|
38
38
|
# this should equal the number of CPU cores in production
|
39
|
-
#
|
40
|
-
# will also correctly function with 0 workers in development mode
|
39
|
+
# it is reasonable to keep it at 1 for development
|
41
40
|
WORKERS: 1
|
42
41
|
|
43
42
|
# this should equal the database pool size
|
44
43
|
SIDEKIQ_CONCURRENCY: 5
|
45
44
|
|
45
|
+
# the name of the service
|
46
|
+
# this gets combined with LOG_PATH and RUN_STATE_PATH to form a full path
|
47
|
+
SERVICE: 'app_name'
|
48
|
+
|
46
49
|
# the path where logs get written to
|
47
|
-
# in production you might consider /var/log
|
50
|
+
# in production you might consider /var/log
|
48
51
|
LOG_PATH: 'log'
|
49
52
|
|
50
53
|
# the path that will contain pids and sockets
|
51
|
-
# in production you will likely want to set this to '/var/run
|
54
|
+
# in production you will likely want to set this to '/var/run'
|
52
55
|
RUN_STATE_PATH: 'tmp'
|
@@ -6,15 +6,17 @@ workers ENV['WORKERS'].to_i
|
|
6
6
|
if ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test'
|
7
7
|
bind 'tcp://0.0.0.0:3000'
|
8
8
|
else
|
9
|
-
bind "unix:#{ENV['RUN_STATE_PATH']}
|
9
|
+
bind "unix:#{ENV['RUN_STATE_PATH']}/#{ENV['SERVICE']}/#{ENV['SERVICE']}"
|
10
10
|
end
|
11
11
|
|
12
|
-
pidfile "#{ENV['RUN_STATE_PATH']}
|
12
|
+
pidfile "#{ENV['RUN_STATE_PATH']}/#{ENV['SERVICE']}/#{ENV['SERVICE']}.pid"
|
13
13
|
|
14
14
|
worker_timeout 30
|
15
15
|
|
16
|
-
stdout_redirect "#{ENV['LOG_PATH']}/
|
17
|
-
"#{ENV['
|
16
|
+
stdout_redirect "#{ENV['LOG_PATH']}/#{ENV['SERVICE']}/" + \
|
17
|
+
"#{ENV['SERVICE']}.access.log",
|
18
|
+
"#{ENV['LOG_PATH']}/#{ENV['SERVICE']}/" + \
|
19
|
+
"#{ENV['SERVICE']}.error.log"
|
18
20
|
|
19
21
|
preload_app!
|
20
22
|
|
@@ -6,15 +6,16 @@ worker_processes ENV['WORKERS'].to_i
|
|
6
6
|
if ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test'
|
7
7
|
listen '0.0.0.0:3000'
|
8
8
|
else
|
9
|
-
listen "unix:#{ENV['RUN_STATE_PATH']}
|
9
|
+
listen "unix:#{ENV['RUN_STATE_PATH']}/#{ENV['SERVICE']}/#{ENV['SERVICE']}",
|
10
|
+
backlog: 64
|
10
11
|
end
|
11
12
|
|
12
|
-
pid "#{ENV['RUN_STATE_PATH']}
|
13
|
+
pid "#{ENV['RUN_STATE_PATH']}/#{ENV['SERVICE']}/#{ENV['SERVICE']}.pid"
|
13
14
|
|
14
15
|
timeout 30
|
15
16
|
|
16
|
-
stdout_path "#{ENV['LOG_PATH']}
|
17
|
-
stderr_path "#{ENV['LOG_PATH']}
|
17
|
+
stdout_path "#{ENV['LOG_PATH']}/#{ENV['SERVICE']}/#{ENV['SERVICE']}.access.log"
|
18
|
+
stderr_path "#{ENV['LOG_PATH']}/#{ENV['SERVICE']}/#{ENV['SERVICE']}.error.log"
|
18
19
|
|
19
20
|
preload_app true
|
20
21
|
|
data/lib/orats/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Janetakis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|