minke 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/minke/docker/docker_runner.rb +10 -12
- data/lib/minke/rake/app.rake +1 -1
- data/lib/minke/tasks/task.rb +9 -0
- data/lib/minke/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDY2MjFhZTEwZjI5OGY0MGFjZDVkYjVkMmViYWI5NDIzNDBhOTdiYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzIyM2IwMGIwNGMyNDU3MjE3Njg1YjAzZDk0YWY2NzFhM2IxZTU2Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGM4M2UyMzZmZmMyYzhhZTFmZWVhMDZiZDMyNDE1NDE1ODBhYzFjNjIxMWE5
|
10
|
+
MjJiZWQzODFjMTFhYWNkMTc1MDU0NzBiYjM5OGI1YjU1ZWM2Y2M3ZDE2MmMx
|
11
|
+
YTEyY2I0NWMzNTI5ZmU3ZDc5NjI3MDBmMDkyMmJmYmMwNmFkZTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MThmMTExOGM4NzIzMzc2OGFhODZiZTliNDMxYTJjMGZiYTQ3YzdmMDAyZWE2
|
14
|
+
ZjZlMTkzZDA3YWE3NWJiOTJiN2Y0NzU5ZDNkMjhiYzcxYTAzNGQxODBkMDE0
|
15
|
+
YzM4N2RkMTBkZDJkNjdmZTA1NDhmYjdmNGQ3OWZiYTVhMzRiNjY=
|
@@ -4,18 +4,16 @@ module Minke
|
|
4
4
|
##
|
5
5
|
# returns the ip address that docker is running on
|
6
6
|
def get_docker_ip_address
|
7
|
-
if ENV['
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
7
|
+
if ENV['DOCKER_HOST']
|
8
|
+
# dockerhost set
|
9
|
+
host = ENV['DOCKER_HOST'].dup
|
10
|
+
host.gsub!(/tcp:\/\//, '')
|
11
|
+
host.gsub!(/:\d+/,'')
|
12
|
+
|
13
|
+
return host
|
14
|
+
else
|
15
|
+
return '127.0.0.1'
|
16
|
+
end
|
19
17
|
end
|
20
18
|
|
21
19
|
##
|
data/lib/minke/rake/app.rake
CHANGED
data/lib/minke/tasks/task.rb
CHANGED
@@ -70,6 +70,8 @@ module Minke
|
|
70
70
|
if @build_file != nil
|
71
71
|
@build_image = "#{@config.application_name}-buildimage"
|
72
72
|
@docker_runner.build_image @build_file, @build_image
|
73
|
+
else
|
74
|
+
@docker_runner.pull_image @build_image unless @docker_runner.find_image @build_image
|
73
75
|
end
|
74
76
|
|
75
77
|
container, success = @docker_runner.create_and_run_container @build_image, settings.binds, settings.env, settings.working_directory, command
|
@@ -85,7 +87,14 @@ module Minke
|
|
85
87
|
if url.type == 'public'
|
86
88
|
"#{url.protocol}://#{url.address}:#{url.port}#{url.path}"
|
87
89
|
else
|
90
|
+
# if running on docker for mac we need to replace the ip address with the docker hosts
|
88
91
|
public_address = @compose.public_address url.address, url.port
|
92
|
+
|
93
|
+
ip = @docker_runner.get_docker_ip_address
|
94
|
+
if ip != "127.0.0.1" && ip != "0.0.0.0" && ip != nil
|
95
|
+
public_address.gsub!('0.0.0.0', ip)
|
96
|
+
end
|
97
|
+
|
89
98
|
"#{url.protocol}://#{public_address}#{url.path}"
|
90
99
|
end
|
91
100
|
end
|
data/lib/minke/version.rb
CHANGED