diff options
author | Malfurious <m@lfurio.us> | 2023-07-23 03:51:21 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2023-07-23 03:51:21 -0400 |
commit | 9551b318e9b1ca0c5b5b448c7c3cdbce8f69ae75 (patch) | |
tree | 4da82d80ffe71b12021d2758f416a6483dc57c85 | |
parent | b1829a94e897bae4bf628fef2ef77c22f313e6ad (diff) | |
download | proxy-docker-9551b318e9b1ca0c5b5b448c7c3cdbce8f69ae75.tar.gz proxy-docker-9551b318e9b1ca0c5b5b448c7c3cdbce8f69ae75.zip |
Split main proxy and acme containers
Split the nginx-proxy and acme-companion services into separate git
repositories, to ease the deployment of systems which won't (or can't)
use the acme helper.
This necessitates bringing back the user-defined network. All other
containers (not just acme) interacting with the proxy will need to use
it.
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r-- | docker-compose.yml | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index 3b7ca0b..445e501 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,25 +1,21 @@ version: "3.7" -services: - nginx-proxy: - container_name: "nginx-proxy" - image: "nginxproxy/nginx-proxy" - volumes: - - "certs:/etc/nginx/certs" - - "dhparam:/etc/nginx/dhparam" - - "vhost:/etc/nginx/vhost.d" - - "html:/usr/share/nginx/html" - - "/var/run/docker.sock:/tmp/docker.sock:ro" - restart: "always" - ports: - - "80:80" - - "443:443" +# Services requiring Lets Encrypt certificates should join the +# 'nginx-proxy-network' network and define BOTH the environment +# variables 'VIRTUAL_HOST' and 'LETSENCRYPT_HOST' to the DNS name +# they use. +# +# This container requires the use of the nginx-proxy service. +# +# See more info here: https://github.com/nginx-proxy/acme-companion +services: acme-companion: container_name: "acme-companion" image: "nginxproxy/acme-companion" - depends_on: - - "nginx-proxy" + restart: "always" + environment: + NGINX_PROXY_CONTAINER: "nginx-proxy" volumes: - "acme:/etc/acme.sh" - "certs:/etc/nginx/certs" @@ -27,13 +23,20 @@ services: - "vhost:/etc/nginx/vhost.d" - "html:/usr/share/nginx/html" - "/var/run/docker.sock:/var/run/docker.sock:ro" - environment: - NGINX_PROXY_CONTAINER: "nginx-proxy" - restart: "always" + networks: + - "nginx-proxy-network" volumes: acme: certs: + external: true dhparam: + external: true vhost: + external: true html: + external: true + +networks: + nginx-proxy-network: + external: true |