Closes csmith/docker-automatic-nginx-letsencrypt#8 This changes the generated config to create an `upstream` block for each service and then reference that within the `server` block. Multiple containers can be grouped together (so that all their hosts are added within the same `upstream` block) by adding a new label to the container with the key "com.chameth.proxy.loadbalance" and the value as the name of the `upstream` block (This will be prefixed with lb_ for uniqueness) If no `loadbalance` label is provided, then the container name is used for the `upstream` block name (prefixed with `ct_` for uniqueness) The `server` block (which defines the certificate name and the vhosts) is built based on the first container found with a given `upstream` block name, so it is reccomended that all containers that are being balanced together should have the same vhosts.pull/4/head
|
|
||
26 |
|
26 |
|
27 |
|
27 |
|
28 |
|
28 |
|
|
29 |
|
|
|
30 |
|
|
29 |
|
31 |
|
30 |
|
32 |
|
31 |
|
33 |
|
|
|
||
22 |
|
22 |
|
23 |
|
23 |
|
24 |
|
24 |
|
25 |
|
|
|
|
25 |
|
|
26 |
|
26 |
|
27 |
|
27 |
|
28 |
|
28 |
|
|
29 |
|
|
29 |
|
30 |
|
30 |
|
31 |
|
31 |
|
32 |
|
|
33 |
|
|
32 |
|
34 |
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
36 |
|
47 |
|
37 |
|
48 |
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
49 |
|
43 |
|
50 |
|
44 |
|
51 |
|
|
|
||
1 |
|
|
|
|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
2 |
|
8 |
|
3 |
|
9 |
|
4 |
|
10 |
|
|
|
||
11 |
|
17 |
|
12 |
|
18 |
|
13 |
|
19 |
|
14 |
|
|
|
|
20 |
|
|
15 |
|
21 |
|
16 |
|
22 |
|
17 |
|
23 |
|