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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c190ebed537c8bceba2405b670d2fc65b189e0d702112b39deec6cea801ebf23
4
- data.tar.gz: 4d52c7dc5a0f6d764a1abb426318bb1f8ebbfa4225c28d6577d4ceac4f298fa6
3
+ metadata.gz: a58920acbac3b3f5f952ae58113b9270f1b6817d8f61faeb357de48aad49b7ba
4
+ data.tar.gz: 89b5140bc2f150a5eda54229efcc984ecac8a3466ead51ac8fb1e57f5f2b8278
5
5
  SHA512:
6
- metadata.gz: ca197bd8b0262b8525102c55b9f8454931d388162059f8d4007e87ae27f85df453b40e47c76e88f438bb39da566faa02608cb87b6d3c6bd9dd9c4c08529c2f46
7
- data.tar.gz: 48aa82c2ec5c8e6687260ce991899fe0f1faab8e914f78f88ed024ffa0a94c3a5d4b32340f5670c8d3deddc37b1d562f959e77118e7988aab65a8475bc2bdfb0
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
- ruby test/test_minimal.rb
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.
@@ -1034,6 +1034,8 @@ private
1034
1034
  end
1035
1035
 
1036
1036
  def node_version
1037
+ return unless using_node? || using_execjs?
1038
+
1037
1039
  version = nil
1038
1040
 
1039
1041
  if File.exist? ".node-version"
@@ -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
- <% else -%>
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.7
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-03-17 00:00:00.000000000 Z
11
+ date: 2024-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails