dory 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dory/config.rb +10 -0
- data/lib/dory/proxy.rb +6 -2
- data/lib/dory/version.rb +2 -2
- 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: fb28a336f3e54a040327c42f065870e7607e8fb57d00a2778f99451b5ce261f4
|
4
|
+
data.tar.gz: 6cc76d4eb6616392daad1fff9122371d16d4cdc23dac3449d42f33f0106f8a4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e192446e0730bfddfc2304b684b297afa81e6356902ba0ffa2ec77f2dd1fd352cf9cde9f47ad6bd26ef7a315f547ea933b8d6f5ef7a6f1cc8bef96f4d2b33e
|
7
|
+
data.tar.gz: d3289c42819a80fd4d0d2d99acccc43cd55e6a21ae79dbfbacbd41ab242692b6b451444e1b5c3de91d0c161807cc9a176fbbcef73b876f92495a6438df00bdaa
|
data/lib/dory/config.rb
CHANGED
@@ -57,6 +57,8 @@ module Dory
|
|
57
57
|
container_name: dory_dinghy_http_proxy
|
58
58
|
https_enabled: true
|
59
59
|
ssl_certs_dir: '' # leave as empty string to use default certs
|
60
|
+
port: 80 # port 80 is default for http
|
61
|
+
tls_port: 443 # port 443 is default for https
|
60
62
|
resolv:
|
61
63
|
enabled: true
|
62
64
|
nameserver: 127.0.0.1
|
@@ -122,6 +124,14 @@ module Dory
|
|
122
124
|
newsettings[:dory][:dnsmasq][:service_start_delay] = 5
|
123
125
|
end
|
124
126
|
|
127
|
+
# add settings for nginx proxy port
|
128
|
+
unless newsettings[:dory][:nginx_proxy][:port]
|
129
|
+
newsettings[:dory][:nginx_proxy][:port] = 80
|
130
|
+
end
|
131
|
+
unless newsettings[:dory][:nginx_proxy][:tls_port]
|
132
|
+
newsettings[:dory][:nginx_proxy][:tls_port] = 443
|
133
|
+
end
|
134
|
+
|
125
135
|
newsettings
|
126
136
|
end
|
127
137
|
end
|
data/lib/dory/proxy.rb
CHANGED
@@ -32,14 +32,18 @@ module Dory
|
|
32
32
|
if [:tls_enabled, :ssl_enabled, :https_enabled].any? { |s|
|
33
33
|
Dory::Config.settings[:dory][:nginx_proxy][s]
|
34
34
|
}
|
35
|
-
"-p
|
35
|
+
"-p #{Dory::Config.settings[:dory][:nginx_proxy][:tls_port]}:443"
|
36
36
|
else
|
37
37
|
''
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
def self.http_port
|
42
|
+
Dory::Config.settings[:dory][:nginx_proxy][:port]
|
43
|
+
end
|
44
|
+
|
41
45
|
def self.run_command
|
42
|
-
"docker run -d -p
|
46
|
+
"docker run -d -p #{http_port}:80 #{self.tls_arg} #{self.certs_arg} "\
|
43
47
|
"-v /var/run/docker.sock:/tmp/docker.sock -e " \
|
44
48
|
"'CONTAINER_NAME=#{Shellwords.escape(self.container_name)}' --name " \
|
45
49
|
"'#{Shellwords.escape(self.container_name)}' " \
|
data/lib/dory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|