dip 7.5.0 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/dip/cli.rb +1 -1
- data/lib/dip/commands/compose.rb +1 -1
- data/lib/dip/commands/runners/docker_compose_runner.rb +21 -0
- data/lib/dip/config.rb +1 -1
- data/lib/dip/interaction_tree.rb +1 -0
- data/lib/dip/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: 077560a05e3c58c34f61f81e80a941a6bb8a88da7b8acc59cb1e8c254985467e
|
4
|
+
data.tar.gz: 8d7b121d08fb87b68bf375b8651cc60f2e27307267f813ea87faf2eee6f88870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a00861123026227700fcb92e3ef1fa47f702efcfdd2bbce83363aeca5bedf7d2c669428f5837828c53edcb76975958334689657f2d52df7f8dee3e3991d0a08
|
7
|
+
data.tar.gz: f2bd7865a209166096b5b9f553da6031ec7192c889f8e6e357a230fd2f9dd9c67259501f358dffde25657370a3f7cf8d628156cbad7d9524ea9505c10ff7c724
|
data/README.md
CHANGED
@@ -132,6 +132,12 @@ interaction:
|
|
132
132
|
compose:
|
133
133
|
run_options: [service-ports, use-aliases]
|
134
134
|
|
135
|
+
stack:
|
136
|
+
description: Run full stack (server, workers, etc.)
|
137
|
+
runner: docker_compose
|
138
|
+
compose:
|
139
|
+
profiles: [web, workers]
|
140
|
+
|
135
141
|
sidekiq:
|
136
142
|
description: Run sidekiq in background
|
137
143
|
service: worker
|
data/lib/dip/cli.rb
CHANGED
data/lib/dip/commands/compose.rb
CHANGED
@@ -9,6 +9,7 @@ module Dip
|
|
9
9
|
class DockerComposeRunner < Base
|
10
10
|
def execute
|
11
11
|
Commands::Compose.new(
|
12
|
+
*compose_profiles,
|
12
13
|
command[:compose][:method],
|
13
14
|
*compose_arguments,
|
14
15
|
shell: command[:shell]
|
@@ -17,6 +18,16 @@ module Dip
|
|
17
18
|
|
18
19
|
private
|
19
20
|
|
21
|
+
def compose_profiles
|
22
|
+
return [] if command[:compose][:profiles].empty?
|
23
|
+
|
24
|
+
update_command_for_profiles
|
25
|
+
|
26
|
+
command[:compose][:profiles].each_with_object([]) do |profile, argv|
|
27
|
+
argv.concat(["--profile", profile])
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
20
31
|
def compose_arguments
|
21
32
|
compose_argv = command[:compose][:run_options].dup
|
22
33
|
|
@@ -57,6 +68,16 @@ module Dip
|
|
57
68
|
[]
|
58
69
|
end
|
59
70
|
end
|
71
|
+
|
72
|
+
def update_command_for_profiles
|
73
|
+
# NOTE: When using profiles, the method is always `up`.
|
74
|
+
# This is because `docker-compose` does not support profiles
|
75
|
+
# for other commands. Also, run options need to be removed
|
76
|
+
# because they are not supported by `up`.
|
77
|
+
command[:compose][:method] = "up"
|
78
|
+
command[:command] = ""
|
79
|
+
command[:compose][:run_options] = []
|
80
|
+
end
|
60
81
|
end
|
61
82
|
end
|
62
83
|
end
|
data/lib/dip/config.rb
CHANGED
data/lib/dip/interaction_tree.rb
CHANGED
@@ -68,6 +68,7 @@ module Dip
|
|
68
68
|
environment: entry[:environment] || {},
|
69
69
|
compose: {
|
70
70
|
method: entry.dig(:compose, :method) || entry[:compose_method] || "run",
|
71
|
+
profiles: Array(entry.dig(:compose, :profiles)),
|
71
72
|
run_options: compose_run_options(entry.dig(:compose, :run_options) || entry[:compose_run_options])
|
72
73
|
}
|
73
74
|
}
|
data/lib/dip/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bibendi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|