docker_nginx_proxy 0.1.0 → 0.1.1
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 +4 -4
- data/lib/docker_nginx_proxy/cli.rb +3 -1
- data/lib/docker_nginx_proxy/nginx.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0967cae0eef4882df14cff4fdb169dec0301b5f
|
4
|
+
data.tar.gz: 652b1e900058a496b6e1d8856a42cf881806517a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a6d6f3b3c4053e8b45ffc02588ea6c0f2b22513dddad1c0b143468234a0790dc8d857d0607366dee7872a5c03fd4b3bb77a2831e46ba33fd2b098de8b10ba02
|
7
|
+
data.tar.gz: e01ddcd22b24b6ffc417a8dc2f957dbf5d3e548278b21a5293397e8ac3ae2ffc49b8c186b7183eee90b3dd55f020736fa4de2a1f91edf49ce921002a86eca061
|
@@ -13,13 +13,15 @@ module DockerNginxProxy
|
|
13
13
|
raise "No docker port found for container port #{container_port}. Mappings: #{docker_port_mappings}" unless docker_port
|
14
14
|
mappings[domain_port] = docker_port
|
15
15
|
end
|
16
|
-
Nginx.new.install_proxy(name, mappings)
|
16
|
+
config_file = Nginx.new.install_proxy(name, mappings)
|
17
|
+
puts " created #{config_file.path}"
|
17
18
|
end
|
18
19
|
|
19
20
|
def _convert_mapping_to_hash(encoded_mappings)
|
20
21
|
mappings = {}
|
21
22
|
encoded_mappings.each do |encoded_mapping|
|
22
23
|
domain_port, container_port = encoded_mapping.split('=', 2)
|
24
|
+
raise 'Each mapping needs to follow format: "domain[:port]=container_port". `' + encoded_mapping + '` does not follow it.' unless container_port
|
23
25
|
mappings[domain_port] = container_port.to_i
|
24
26
|
end
|
25
27
|
mappings
|
@@ -4,8 +4,7 @@ module DockerNginxProxy
|
|
4
4
|
def install_proxy(name, mapping)
|
5
5
|
content = generate_proxy_config(mapping)
|
6
6
|
path = '/etc/nginx/sites-available/' + name
|
7
|
-
|
8
|
-
#File.write(path, content)
|
7
|
+
File.write(path, content)
|
9
8
|
end
|
10
9
|
|
11
10
|
def generate_proxy_config(mapping)
|