kuby-core 0.19.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/bin/kuby +2 -0
- data/lib/kuby/docker/layer_stack.rb +9 -0
- data/lib/kuby/docker/spec.rb +5 -0
- data/lib/kuby/plugins/rails_app/plugin.rb +30 -26
- data/lib/kuby/version.rb +1 -1
- 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: c3e98a72e5798436209eb36042b9cb6e59ea7491d772c3b04ea04ea12b81b612
|
4
|
+
data.tar.gz: 1a8b6a6e8704c885d3326e4a8e4e2aaf77fff5f67d9a9c4d8bb3cac546798fd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17f78515bf3e52d54299f678e3f55a6a11e4b5ad0272aff8051b447bc0904787df10f382fea3ecb470d6c46f67b0fb935817f4bd3816d292a4e5f55f37e8594a
|
7
|
+
data.tar.gz: 200a1df0299181a7334e4deaa737f69b6d3f30cbc5583c71be73b7ae088cb7f71e3bdf4b3418b6f1173ed3161bde00387410ecbe2b85d8f4c10bca6fa8a5ad64
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
## Unreleased
|
2
|
+
|
3
|
+
## 0.20.0
|
2
4
|
* Modify the Rails generator to add the `activerecord-cockroachdb-adapter` to your bundle.
|
5
|
+
* Add the `LayerStack#replace` and corresponding `Docker::Spec#replace` methods for replacing phases. This can be a lot easier than using `#insert` and `#delete`, which can mess with the relative order of the phases and cause surprising results.
|
6
|
+
* Don't run init containers for creating and migrating the database if database management is turned off.
|
3
7
|
|
4
8
|
## 0.19.0
|
5
|
-
* Add support
|
9
|
+
* Add support for configuring the number of web workers for puma (#124, @zhalltyemill)
|
6
10
|
|
7
11
|
## 0.18.0
|
8
12
|
* Add the ability to specify your app's root directory.
|
data/bin/kuby
CHANGED
@@ -94,6 +94,15 @@ module Kuby
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
+
# T::Sig::WithoutRuntime.sig { params(name: Symbol, layer: Layer).void }
|
98
|
+
def replace(name, layer)
|
99
|
+
unless layers.include?(name)
|
100
|
+
raise ArgumentError, "Could not find existing layer '#{name}'"
|
101
|
+
end
|
102
|
+
|
103
|
+
layers[name] = layer
|
104
|
+
end
|
105
|
+
|
97
106
|
# T::Sig::WithoutRuntime.sig { params(name: Symbol).void }
|
98
107
|
def delete(name)
|
99
108
|
stack.delete(name)
|
data/lib/kuby/docker/spec.rb
CHANGED
@@ -145,6 +145,11 @@ module Kuby
|
|
145
145
|
layer_stack.insert(name, layer, options, &block)
|
146
146
|
end
|
147
147
|
|
148
|
+
# T::Sig::WithoutRuntime.sig { params(name: Symbol, layer: Layer).void }
|
149
|
+
def replace(name, layer)
|
150
|
+
layer_stack.replace(name, layer)
|
151
|
+
end
|
152
|
+
|
148
153
|
# T::Sig::WithoutRuntime.sig { params(name: Symbol).void }
|
149
154
|
def delete(name)
|
150
155
|
layer_stack.delete(name)
|
@@ -106,12 +106,14 @@ module Kuby
|
|
106
106
|
image image_with_tag
|
107
107
|
end
|
108
108
|
|
109
|
-
|
110
|
-
|
111
|
-
|
109
|
+
if spec.manage_database?
|
110
|
+
init_container(:create_db) do
|
111
|
+
image image_with_tag
|
112
|
+
end
|
112
113
|
|
113
|
-
|
114
|
-
|
114
|
+
init_container(:migrate_db) do
|
115
|
+
image image_with_tag
|
116
|
+
end
|
115
117
|
end
|
116
118
|
end
|
117
119
|
end
|
@@ -308,36 +310,38 @@ module Kuby
|
|
308
310
|
end
|
309
311
|
end
|
310
312
|
|
311
|
-
|
312
|
-
|
313
|
-
|
313
|
+
if kube_spec.manage_database?
|
314
|
+
init_container(:create_db) do
|
315
|
+
name "#{kube_spec.selector_app}-create-db"
|
316
|
+
command %w(bundle exec rake kuby:rails_app:db:bootstrap)
|
314
317
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
+
env_from do
|
319
|
+
config_map_ref do
|
320
|
+
name kube_spec.config_map.metadata.name
|
321
|
+
end
|
318
322
|
end
|
319
|
-
end
|
320
323
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
+
env_from do
|
325
|
+
secret_ref do
|
326
|
+
name kube_spec.app_secrets.metadata.name
|
327
|
+
end
|
324
328
|
end
|
325
329
|
end
|
326
|
-
end
|
327
330
|
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
+
init_container(:migrate_db) do
|
332
|
+
name "#{kube_spec.selector_app}-migrate-db"
|
333
|
+
command %w(bundle exec rake kuby:rails_app:db:migrate)
|
331
334
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
+
env_from do
|
336
|
+
config_map_ref do
|
337
|
+
name kube_spec.config_map.metadata.name
|
338
|
+
end
|
335
339
|
end
|
336
|
-
end
|
337
340
|
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
+
env_from do
|
342
|
+
secret_ref do
|
343
|
+
name kube_spec.app_secrets.metadata.name
|
344
|
+
end
|
341
345
|
end
|
342
346
|
end
|
343
347
|
end
|
data/lib/kuby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01
|
11
|
+
date: 2023-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|