dip 7.2.0 → 7.3.0

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: 737530a0e1bcc0319fdd15a9f5a1cd21f5d5fe5283ed6e6811b322797608bbff
4
- data.tar.gz: 246fd6ef9d149b08cbe260ca9d22247824029af5c018b525460c68cffdf8c104
3
+ metadata.gz: fd70c4af79fd861df4bfdb85662727067ad86b0b6705483ffbaf47818bf1a914
4
+ data.tar.gz: adacf1505575f58dbfeff69377dd65a17bf883029e4108ea1ba678b41cfc7106
5
5
  SHA512:
6
- metadata.gz: 54cf7a9194457a328326b4d43cef583c3baedfd880f3679fd2e6c2699b728b48f5017f238a957ab9c799145e790146695f15c5e4abd4ae0a1860ff58e177ead6
7
- data.tar.gz: 69295132d41712bda09979dea08e504eae8d55805639c940545586bc8f4544e1963d36472cddc2e933758ecefa8783c468b8dcc6c3737ef4a82e7c2a6b313013
6
+ metadata.gz: 8dbe5aae1bd167ce4887a0557c8deaac21987480034f79efee0a45bd9718f9c41487c76f42cf6e51feac4764988e5145c394aeb657e299119d269555c3d5d01f
7
+ data.tar.gz: 7972685fc3b4cbdf38e1ffbf60aed7786b2176967b5c850bb69ba463ba4a983ef0dc3c677c4e1b2b5fa6db8bdb47d8817cf83fa666e7abe749e74fc5715e6e5c
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 bibendi
3
+ Copyright (c) 2016 Mikhail Merkushin aka bibendi
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -1,17 +1,15 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/dip.svg)](https://badge.fury.io/rb/dip)
2
- [![Build Status](https://travis-ci.org/bibendi/dip.svg?branch=master)](https://travis-ci.org/bibendi/dip)
2
+ [![Build Status](https://github.com/bibendi/dip/workflows/Ruby/badge.svg?branch=master)](https://github.com/bibendi/dip/actions?query=branch%3Amaster)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/d0dca854f0930502f7b3/maintainability)](https://codeclimate.com/github/bibendi/dip/maintainability)
4
4
 
5
5
  # DIP
6
6
 
7
- Docker Interaction Process
7
+ Docker Interaction Program.
8
8
 
9
- A command-line utility that gives the "native" interaction with applications configured with Docker Compose. It is for local development only. In practice, it creates the feeling that you work without containers.
9
+ Development-environment CLI program providing the native-like interaction with a Dockerized application. It creates the feeling that you are working without mind-blowing commands to run the containers.
10
10
 
11
- <p float="left">
12
- <a href="https://evilmartians.com/?utm_source=dip"><img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" height="80" /></a>
13
- <img src="https://ya-webdesign.com/images250_/vertical-divider-png-1.png" width="50" height="100" />
14
- <a href="https://www.jetbrains.com/?from=DIP"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/JetBrains_Logo_2016.svg/1200px-JetBrains_Logo_2016.svg.png" alt="Sponsored by JetBrains" height="100" /></a></p>
11
+ <a href="https://evilmartians.com/?utm_source=dip">
12
+ <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" height="80" /></a>
15
13
 
16
14
  ## Presentations and examples
17
15
 
@@ -226,6 +224,16 @@ Use options `-p, --publish=[]` if you need to additionally publish a container's
226
224
  dip run -p 3000:3000 bundle exec rackup config.ru
227
225
  ```
228
226
 
227
+ You can also override docker compose command by passing `DIP_COMPOSE_COMMAND` if you wish. For example if you want to use [`mutagen-compose`](https://mutagen.io/documentation/orchestration/compose) run `DIP_COMPOSE_COMMAND=mutagen-compose dip run`.
228
+
229
+ If you want to persist that change you can specify command in `compose` section of dip.yml :
230
+
231
+ ```yml
232
+ compose:
233
+ command: mutagen-compose
234
+
235
+ ```
236
+
229
237
  ### dip ls
230
238
 
231
239
  List all available run commands.
@@ -295,7 +303,7 @@ services:
295
303
 
296
304
  ### dip nginx
297
305
 
298
- Runs Nginx server container based on [bibendi/nginx-proxy](https://github.com/bibendi/nginx-proxy) image. An application's docker-compose.yml should contain environment variable `VIRTUAL_HOST` and `VIRTUAL_PATH` and connects to external network `frontend`.
306
+ Runs Nginx server container based on [nginxproxy/nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) image. An application's docker-compose.yml should contain environment variable `VIRTUAL_HOST` and `VIRTUAL_PATH` and connects to external network `frontend`.
299
307
 
300
308
  foo-project/docker-compose.yml
301
309
 
@@ -9,7 +9,7 @@ module Dip
9
9
  class Console < Base
10
10
  desc "start", "Integrate Dip into current shell"
11
11
  method_option :help, aliases: "-h", type: :boolean,
12
- desc: "Display usage information"
12
+ desc: "Display usage information"
13
13
  def start
14
14
  if options[:help]
15
15
  invoke :help, ["start"]
@@ -22,7 +22,7 @@ module Dip
22
22
 
23
23
  desc "inject", "Inject aliases"
24
24
  method_option :help, aliases: "-h", type: :boolean,
25
- desc: "Display usage information"
25
+ desc: "Display usage information"
26
26
  def inject
27
27
  if options[:help]
28
28
  invoke :help, ["inject"]
data/lib/dip/cli/dns.rb CHANGED
@@ -10,19 +10,19 @@ module Dip
10
10
  class DNS < Base
11
11
  desc "up", "Run dnsdock container"
12
12
  method_option :help, aliases: "-h", type: :boolean,
13
- desc: "Display usage information"
13
+ desc: "Display usage information"
14
14
  method_option :name, aliases: "-n", type: :string, default: "dnsdock",
15
- desc: "Container name"
15
+ desc: "Container name"
16
16
  method_option :socket, aliases: "-s", type: :string, default: "/var/run/docker.sock",
17
- desc: "Path to docker socket"
17
+ desc: "Path to docker socket"
18
18
  method_option :net, aliases: "-t", type: :string, default: "frontend",
19
- desc: "Container network name"
19
+ desc: "Container network name"
20
20
  method_option :publish, aliases: "-p", type: :string, default: "53/udp",
21
- desc: "Container port"
21
+ desc: "Container port"
22
22
  method_option :image, aliases: "-i", type: :string, default: "aacebedo/dnsdock:latest-amd64",
23
- desc: "Docker image name"
23
+ desc: "Docker image name"
24
24
  method_option :domain, aliases: "-d", type: :string, default: "docker",
25
- desc: "Top level domain"
25
+ desc: "Top level domain"
26
26
  def up
27
27
  if options[:help]
28
28
  invoke :help, ["up"]
@@ -40,9 +40,9 @@ module Dip
40
40
 
41
41
  desc "down", "Stop dnsdock container"
42
42
  method_option :help, aliases: "-h", type: :boolean,
43
- desc: "Display usage information"
43
+ desc: "Display usage information"
44
44
  method_option :name, aliases: "-n", type: :string, default: "dnsdock",
45
- desc: "Container name"
45
+ desc: "Container name"
46
46
  def down
47
47
  if options[:help]
48
48
  invoke :help, ["down"]
@@ -55,7 +55,7 @@ module Dip
55
55
 
56
56
  desc "restart", "Stop and start dnsdock container"
57
57
  method_option :help, aliases: "-h", type: :boolean,
58
- desc: "Display usage information"
58
+ desc: "Display usage information"
59
59
  def restart(*args)
60
60
  if options[:help]
61
61
  invoke :help, ["restart"]
@@ -68,11 +68,11 @@ module Dip
68
68
 
69
69
  desc "ip", "Get ip address of dnsdock container"
70
70
  method_option :help, aliases: "-h", type: :boolean,
71
- desc: "Display usage information"
71
+ desc: "Display usage information"
72
72
  method_option :name, aliases: "-n", type: :string, default: "dnsdock",
73
- desc: "Container name"
73
+ desc: "Container name"
74
74
  method_option :net, aliases: "-t", type: :string, default: "frontend",
75
- desc: "Container network name"
75
+ desc: "Container network name"
76
76
  def ip
77
77
  if options[:help]
78
78
  invoke :help, ["status"]
data/lib/dip/cli/nginx.rb CHANGED
@@ -6,23 +6,23 @@ require_relative "../commands/nginx"
6
6
 
7
7
  module Dip
8
8
  class CLI
9
- # See more https://github.com/bibendi/nginx-proxy
9
+ # See more https://github.com/nginx-proxy/nginx-proxy
10
10
  class Nginx < Base
11
11
  desc "up", "Run nginx container"
12
12
  method_option :help, aliases: "-h", type: :boolean,
13
- desc: "Display usage information"
13
+ desc: "Display usage information"
14
14
  method_option :name, aliases: "-n", type: :string, default: "nginx",
15
- desc: "Container name"
15
+ desc: "Container name"
16
16
  method_option :socket, aliases: "-s", type: :string, default: "/var/run/docker.sock",
17
- desc: "Path to docker socket"
17
+ desc: "Path to docker socket"
18
18
  method_option :net, aliases: "-t", type: :string, default: "frontend",
19
- desc: "Container network name"
19
+ desc: "Container network name"
20
20
  method_option :publish, aliases: "-p", type: :array, default: ["80:80"],
21
- desc: "Container port(s). For more than one port, separate them by a space"
22
- method_option :image, aliases: "-i", type: :string, default: "bibendi/nginx-proxy:latest",
23
- desc: "Docker image name"
21
+ desc: "Container port(s). For more than one port, separate them by a space"
22
+ method_option :image, aliases: "-i", type: :string, default: "nginxproxy/nginx-proxy:latest",
23
+ desc: "Docker image name"
24
24
  method_option :domain, aliases: "-d", type: :string, default: "docker",
25
- desc: "Top level domain"
25
+ desc: "Top level domain"
26
26
  method_option :certs, aliases: "-c", type: :string, desc: "Path to ssl certificates"
27
27
  def up
28
28
  if options[:help]
@@ -42,9 +42,9 @@ module Dip
42
42
 
43
43
  desc "down", "Stop nginx container"
44
44
  method_option :help, aliases: "-h", type: :boolean,
45
- desc: "Display usage information"
45
+ desc: "Display usage information"
46
46
  method_option :name, aliases: "-n", type: :string, default: "nginx",
47
- desc: "Container name"
47
+ desc: "Container name"
48
48
  def down
49
49
  if options[:help]
50
50
  invoke :help, ["down"]
@@ -57,7 +57,7 @@ module Dip
57
57
 
58
58
  desc "restart", "Stop and start nginx container"
59
59
  method_option :help, aliases: "-h", type: :boolean,
60
- desc: "Display usage information"
60
+ desc: "Display usage information"
61
61
  def restart(*args)
62
62
  if options[:help]
63
63
  invoke :help, ["restart"]
data/lib/dip/cli/ssh.rb CHANGED
@@ -9,18 +9,18 @@ module Dip
9
9
  class SSH < Base
10
10
  desc "up", "Run ssh-agent container"
11
11
  method_option :help, aliases: "-h", type: :boolean,
12
- desc: "Display usage information"
12
+ desc: "Display usage information"
13
13
  method_option :key, aliases: "-k", type: :string, default: "$HOME/.ssh/id_rsa",
14
- desc: "Path to ssh key"
14
+ desc: "Path to ssh key"
15
15
  method_option :volume, aliases: "-v", type: :string, default: "$HOME",
16
- desc: "Mounted docker volume"
16
+ desc: "Mounted docker volume"
17
17
  method_option :interactive, aliases: "-t", type: :boolean, default: true,
18
- desc: "Run in interactive mode"
18
+ desc: "Run in interactive mode"
19
19
  method_option :user, aliases: "-u", type: :string,
20
- desc: "UID for ssh-agent container"
20
+ desc: "UID for ssh-agent container"
21
21
  # Backward compatibility
22
22
  method_option :nonteractive, aliases: "-T", type: :boolean,
23
- desc: "Run in noninteractive mode"
23
+ desc: "Run in noninteractive mode"
24
24
  def up
25
25
  if options[:help]
26
26
  invoke :help, ["up"]
@@ -38,7 +38,7 @@ module Dip
38
38
 
39
39
  desc "down", "Stop ssh-agent container"
40
40
  method_option :help, aliases: "-h", type: :boolean,
41
- desc: "Display usage information"
41
+ desc: "Display usage information"
42
42
  def down
43
43
  if options[:help]
44
44
  invoke :help, ["down"]
@@ -49,7 +49,7 @@ module Dip
49
49
 
50
50
  desc "restart", "Stop and start ssh-agent container"
51
51
  method_option :help, aliases: "-h", type: :boolean,
52
- desc: "Display usage information"
52
+ desc: "Display usage information"
53
53
  def restart(*args)
54
54
  if options[:help]
55
55
  invoke :help, ["restart"]
@@ -62,7 +62,7 @@ module Dip
62
62
 
63
63
  desc "status", "Show status of ssh-agent container"
64
64
  method_option :help, aliases: "-h", type: :boolean,
65
- desc: "Display usage information"
65
+ desc: "Display usage information"
66
66
  def status
67
67
  if options[:help]
68
68
  invoke :help, ["status"]
data/lib/dip/cli.rb CHANGED
@@ -75,7 +75,7 @@ module Dip
75
75
 
76
76
  desc "run [OPTIONS] CMD [ARGS]", "Run configured command in a docker-compose service. `run` prefix may be omitted"
77
77
  method_option :publish, aliases: "-p", type: :string, repeatable: true,
78
- desc: "Publish a container's port(s) to the host"
78
+ desc: "Publish a container's port(s) to the host"
79
79
  method_option :help, aliases: "-h", type: :boolean, desc: "Display usage information"
80
80
  def run(*argv)
81
81
  if argv.empty? || options[:help]
@@ -88,7 +88,7 @@ module Dip
88
88
 
89
89
  desc "provision", "Execute commands within provision section"
90
90
  method_option :help, aliases: "-h", type: :boolean,
91
- desc: "Display usage information"
91
+ desc: "Display usage information"
92
92
  def provision
93
93
  if options[:help]
94
94
  invoke :help, ["provision"]
@@ -23,7 +23,10 @@ module Dip
23
23
 
24
24
  compose_argv = Array(find_files) + Array(cli_options) + argv
25
25
 
26
- if compose_v2?
26
+ if (override_command = compose_command_override)
27
+ override_command, *override_args = override_command.split(" ")
28
+ exec_program(override_command, override_args.concat(compose_argv), shell: shell)
29
+ elsif compose_v2?
27
30
  exec_program("docker", compose_argv.unshift("compose"), shell: shell)
28
31
  else
29
32
  exec_program("docker-compose", compose_argv, shell: shell)
@@ -80,6 +83,10 @@ module Dip
80
83
 
81
84
  !!exec_subprocess("docker", "compose version", panic: false, out: File::NULL, err: File::NULL)
82
85
  end
86
+
87
+ def compose_command_override
88
+ Dip.env["DIP_COMPOSE_COMMAND"] || config[:command]
89
+ end
83
90
  end
84
91
  end
85
92
  end
data/lib/dip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dip
4
- VERSION = "7.2.0"
4
+ VERSION = "7.3.0"
5
5
  end
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.2.0
4
+ version: 7.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bibendi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-22 00:00:00.000000000 Z
11
+ date: 2022-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  - !ruby/object:Gem::Version
212
212
  version: '0'
213
213
  requirements: []
214
- rubygems_version: 3.1.2
214
+ rubygems_version: 3.2.32
215
215
  signing_key:
216
216
  specification_version: 4
217
217
  summary: Ruby gem CLI tool for better interacting docker-compose files.