dockerfile-rails 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/generators/dockerfile_generator.rb +2 -0
- data/lib/generators/templates/Dockerfile.erb +5 -1
- data/lib/generators/templates/litefs.yml.erb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a58920acbac3b3f5f952ae58113b9270f1b6817d8f61faeb357de48aad49b7ba
|
4
|
+
data.tar.gz: 89b5140bc2f150a5eda54229efcc984ecac8a3466ead51ac8fb1e57f5f2b8278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77b12d5c786818fe06fcc7e931fd525d5737b4e7cfcf8a28c30807e7492bcf2a8c71cc30aeeacae1eed0cc148d8b75cee9c8e5ba73748e2fa797bd6075389da0
|
7
|
+
data.tar.gz: 868466c5f0b09071614d0530ea529e51906967e9976832596b35bd7d130a2e7ffc57e872df6db3bd0921b855f68e886f91027555840d295c3b3aedabf01cb850
|
data/README.md
CHANGED
@@ -128,7 +128,9 @@ Running all integration tests, or even a single individual test can be done as f
|
|
128
128
|
|
129
129
|
```
|
130
130
|
rake test
|
131
|
-
|
131
|
+
|
132
|
+
bundle exec rake test TEST=test/test_minimal.rb
|
133
|
+
bundle exec ruby test/test_minimal.rb
|
132
134
|
```
|
133
135
|
|
134
136
|
To assist with this process, outputs of tests can be captured automatically. This is useful when adding new tests and when making a change that affects many tests. Be sure to inspect the output (e.g., by using `git diff`) before committing.
|
@@ -286,7 +286,11 @@ ENV <%= deploy_env.join(" \\\n ") %>
|
|
286
286
|
<% else -%>
|
287
287
|
# Entrypoint sets up the container.
|
288
288
|
<% end -%>
|
289
|
+
<% if using_litefs? -%>
|
290
|
+
ENTRYPOINT ["litefs", "mount"]
|
291
|
+
<% else -%>
|
289
292
|
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
293
|
+
<% end -%>
|
290
294
|
|
291
295
|
<% if procfile.size > 1 -%>
|
292
296
|
# Build a Procfile for production use
|
@@ -307,7 +311,7 @@ VOLUME /data
|
|
307
311
|
CMD ["foreman", "start", "--procfile=<%= options.procfile %>"]
|
308
312
|
<% elsif procfile.size > 1 -%>
|
309
313
|
CMD ["foreman", "start", "--procfile=Procfile.prod"]
|
310
|
-
<%
|
314
|
+
<% elsif !using_litefs? -%>
|
311
315
|
CMD <%= procfile.values.first.split(" ").inspect %>
|
312
316
|
<% end -%>
|
313
317
|
<% end -%>
|
@@ -77,6 +77,8 @@ proxy:
|
|
77
77
|
# "static" which assigns a single node to be the primary and does
|
78
78
|
# not failover.
|
79
79
|
lease:
|
80
|
+
promote: true
|
81
|
+
|
80
82
|
# Required. Must be either "consul" or "static".
|
81
83
|
type: "consul"
|
82
84
|
|
@@ -114,3 +116,19 @@ lease:
|
|
114
116
|
# can become leader. This buffer is intended to prevent
|
115
117
|
# overlap in leadership due to clock skew or in-flight calls.
|
116
118
|
lock-delay: "1s"
|
119
|
+
|
120
|
+
exec:
|
121
|
+
# Only run migrations on candidate nodes.
|
122
|
+
- cmd: "./bin/rails db:prepare"
|
123
|
+
if-candidate: true
|
124
|
+
|
125
|
+
# Then run the application server on all nodes.
|
126
|
+
<% if !options.procfile.blank? -%>
|
127
|
+
- cmd: "foreman start --procfile=<%= options.procfile %>"
|
128
|
+
<% elsif procfile.size > 1 -%>
|
129
|
+
- cmd: "foreman start --procfile=Procfile.prod"
|
130
|
+
<% elsif !using_litefs? -%>
|
131
|
+
- cmd: <%= procfile.values.first.split(" ").inspect %>
|
132
|
+
<% else -%>
|
133
|
+
- cmd: "./bin/rails server"
|
134
|
+
<% end -%>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|