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.
Check that certificate file exists before we create the service.
This closes csmith/docker-service-nginx#2
Requires that `letsencrypt-data` volume is mounted at /letsencrypt in csmith/docker-automatic-nginx-letsencrypt