@ossy/deployment-tools 0.0.10 → 0.0.12
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.
- package/Caddyfile +9 -0
- package/caddyfile.json +114 -0
- package/dist/index.js +27 -12
- package/package.json +1 -1
- package/src/caddy-client.js +28 -13
- package/src/Caddyfile +0 -18
package/Caddyfile
ADDED
package/caddyfile.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apps":{
|
|
3
|
+
"http":{
|
|
4
|
+
"servers":{
|
|
5
|
+
"srv0":{
|
|
6
|
+
"listen":[
|
|
7
|
+
":443"
|
|
8
|
+
],
|
|
9
|
+
"routes":[
|
|
10
|
+
{
|
|
11
|
+
"match":[
|
|
12
|
+
{
|
|
13
|
+
"host":[
|
|
14
|
+
"*.qa.ossy.com"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"handle":[
|
|
19
|
+
{
|
|
20
|
+
"handler":"subroute",
|
|
21
|
+
"routes":[
|
|
22
|
+
{
|
|
23
|
+
"group":"group2",
|
|
24
|
+
"handle":[
|
|
25
|
+
{
|
|
26
|
+
"handler":"subroute",
|
|
27
|
+
"routes":[
|
|
28
|
+
{
|
|
29
|
+
"handle":[
|
|
30
|
+
{
|
|
31
|
+
"handler":"reverse_proxy",
|
|
32
|
+
"upstreams":[
|
|
33
|
+
{
|
|
34
|
+
"dial":"localhost:3005"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"match":[
|
|
44
|
+
{
|
|
45
|
+
"host":[
|
|
46
|
+
"ci.qa.example.com"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"group":"group2",
|
|
53
|
+
"handle":[
|
|
54
|
+
{
|
|
55
|
+
"handler":"subroute",
|
|
56
|
+
"routes":[
|
|
57
|
+
{
|
|
58
|
+
"handle":[
|
|
59
|
+
{
|
|
60
|
+
"body":"Wrong turn!",
|
|
61
|
+
"handler":"static_response"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"terminal":true
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"tls":{
|
|
79
|
+
"automation":{
|
|
80
|
+
"policies":[
|
|
81
|
+
{
|
|
82
|
+
"subjects":[
|
|
83
|
+
"*.qa.ossy.com"
|
|
84
|
+
],
|
|
85
|
+
"issuers":[
|
|
86
|
+
{
|
|
87
|
+
"challenges":{
|
|
88
|
+
"dns":{
|
|
89
|
+
"provider":{
|
|
90
|
+
"max_retries":10,
|
|
91
|
+
"name":"route53"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"module":"acme"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"challenges":{
|
|
99
|
+
"dns":{
|
|
100
|
+
"provider":{
|
|
101
|
+
"max_retries":10,
|
|
102
|
+
"name":"route53"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"module":"zerossl"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -28460,20 +28460,35 @@ class CaddyClient {
|
|
|
28460
28460
|
},
|
|
28461
28461
|
tls: {
|
|
28462
28462
|
automation: {
|
|
28463
|
-
policies:
|
|
28464
|
-
|
|
28465
|
-
|
|
28466
|
-
|
|
28467
|
-
|
|
28468
|
-
|
|
28469
|
-
|
|
28470
|
-
|
|
28463
|
+
policies: [
|
|
28464
|
+
{
|
|
28465
|
+
subjects:['*.qa.ossy.com'],
|
|
28466
|
+
issuers:[
|
|
28467
|
+
{
|
|
28468
|
+
challenges:{
|
|
28469
|
+
dns:{
|
|
28470
|
+
provider:{
|
|
28471
|
+
'max_retries':10,
|
|
28472
|
+
name: 'route53'
|
|
28473
|
+
}
|
|
28474
|
+
}
|
|
28475
|
+
},
|
|
28476
|
+
module: 'acme'
|
|
28477
|
+
},
|
|
28478
|
+
{
|
|
28479
|
+
challenges:{
|
|
28480
|
+
dns:{
|
|
28481
|
+
provider:{
|
|
28482
|
+
'max_retries':10,
|
|
28483
|
+
name: 'route53'
|
|
28484
|
+
}
|
|
28471
28485
|
}
|
|
28472
|
-
}
|
|
28486
|
+
},
|
|
28487
|
+
module: 'zerossl'
|
|
28473
28488
|
}
|
|
28474
|
-
|
|
28475
|
-
|
|
28476
|
-
|
|
28489
|
+
]
|
|
28490
|
+
}
|
|
28491
|
+
]
|
|
28477
28492
|
}
|
|
28478
28493
|
}
|
|
28479
28494
|
}
|
package/package.json
CHANGED
package/src/caddy-client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fetch from 'node-fetch'
|
|
2
2
|
import * as config from './config.js'
|
|
3
3
|
|
|
4
|
-
const Matchers = {
|
|
4
|
+
export const Matchers = {
|
|
5
5
|
host: host => ({ host: [host] }),
|
|
6
6
|
path: path => ({ path: [path] })
|
|
7
7
|
}
|
|
@@ -58,20 +58,35 @@ class CaddyClient {
|
|
|
58
58
|
},
|
|
59
59
|
tls: {
|
|
60
60
|
automation: {
|
|
61
|
-
policies:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
policies: [
|
|
62
|
+
{
|
|
63
|
+
subjects:['*.qa.ossy.com'],
|
|
64
|
+
issuers:[
|
|
65
|
+
{
|
|
66
|
+
challenges:{
|
|
67
|
+
dns:{
|
|
68
|
+
provider:{
|
|
69
|
+
'max_retries':10,
|
|
70
|
+
name: 'route53'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
module: 'acme'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
challenges:{
|
|
78
|
+
dns:{
|
|
79
|
+
provider:{
|
|
80
|
+
'max_retries':10,
|
|
81
|
+
name: 'route53'
|
|
82
|
+
}
|
|
69
83
|
}
|
|
70
|
-
}
|
|
84
|
+
},
|
|
85
|
+
module: 'zerossl'
|
|
71
86
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]
|
|
75
90
|
}
|
|
76
91
|
}
|
|
77
92
|
}
|