orchestration 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89c669c1e10aec69b7b61b51e683badb050ee64352f67e0a1be7f44efcdd16f4
|
4
|
+
data.tar.gz: bd6525302ab21aaceec8a07bdb1381e5599b401e120e128880c6ce8476ddeb33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 151fd08a7f0f01b5612123a083537e8d410b17fffd0c8ab74640fd91338f6a6a054aeaa6838889c4dbe0b16a3d7e64ad2aa136f45f1bf7e5d94c94f9e95f3a16
|
7
|
+
data.tar.gz: f31f18aff4138549dd0bd46546ec4b02e168298cc60b99f95b00d1a86193a6ae17c90a361630e2faa1bcbf0bc96d3d71e2ce4a58c86e679eed9f16353cea8374
|
data/README.md
CHANGED
@@ -24,13 +24,21 @@ module Orchestration
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def friendly_config
|
27
|
-
"[mongoid] #{host}:#{
|
27
|
+
"[mongoid] #{host}:#{port}/#{database}"
|
28
28
|
end
|
29
29
|
|
30
30
|
def port
|
31
|
+
return url_config[:port] unless url_config.nil?
|
32
|
+
|
31
33
|
DockerCompose::MongoService::PORT
|
32
34
|
end
|
33
35
|
|
36
|
+
def host
|
37
|
+
return url_config[:host] unless url_config.nil?
|
38
|
+
|
39
|
+
super
|
40
|
+
end
|
41
|
+
|
34
42
|
private
|
35
43
|
|
36
44
|
def hosts_config
|
@@ -42,6 +50,13 @@ module Orchestration
|
|
42
50
|
}
|
43
51
|
end
|
44
52
|
|
53
|
+
def url_config
|
54
|
+
return nil unless ENV.key?('MONGO_URL')
|
55
|
+
|
56
|
+
host, _, port = ENV['MONGO_URL'].partition(':')
|
57
|
+
{ host: host, port: port.empty? ? '27017' : port }
|
58
|
+
end
|
59
|
+
|
45
60
|
def database
|
46
61
|
env_config = config.fetch(@env.environment)
|
47
62
|
return env_config.fetch('database') if env_config.key?('database')
|
@@ -19,6 +19,6 @@ RUN . /root/.bashrc && yarn install
|
|
19
19
|
<% end %>
|
20
20
|
COPY entrypoint.sh /
|
21
21
|
ADD .build/context.tar.gz .
|
22
|
-
<% if defined?(Webpacker) %>RUN . /root/.bashrc && NODE_ENV=production RAILS_ENV=production yarn install && NODE_ENV=production RAILS_ENV=production bundle exec rake assets:precompile<% elsif Rake::Task.tasks.map(&:name).include?('assets:precompile') %>RUN NODE_ENV=production RAILS_ENV=production bundle exec rake assets:precompile<% end %>
|
22
|
+
<% if defined?(Webpacker) %>RUN . /root/.bashrc && NODE_ENV=production RAILS_ENV=production yarn install && NODE_ENV=production RAILS_ENV=production SECRET_KEY_BASE=abc123 bundle exec rake assets:precompile<% elsif Rake::Task.tasks.map(&:name).include?('assets:precompile') %>RUN NODE_ENV=production RAILS_ENV=production SECRET_KEY_BASE=abc123 bundle exec rake assets:precompile<% end %>
|
23
23
|
ENTRYPOINT ["/entrypoint.sh"]
|
24
24
|
CMD ["bundle", "exec", "unicorn", "-c", "/app/config/unicorn.rb"]
|