diff options
author | Malfurious <m@lfurio.us> | 2023-07-23 01:10:25 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2023-07-23 01:10:25 -0400 |
commit | d58fdffdc6fd0edab585e6ff23a5f8b43a8e3746 (patch) | |
tree | 478557c3961c8ea209b5909b18d9f392a7faac99 | |
parent | b1829a94e897bae4bf628fef2ef77c22f313e6ad (diff) | |
download | proxy-docker-d58fdffdc6fd0edab585e6ff23a5f8b43a8e3746.tar.gz proxy-docker-d58fdffdc6fd0edab585e6ff23a5f8b43a8e3746.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 | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index 3b7ca0b..b408424 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,39 +1,40 @@ version: "3.7" +# Services requiring reverse proxy functionality should join the +# 'nginx-proxy-network' network and define the environment variable +# 'VIRTUAL_HOST' to the DNS name they use. +# +# This container works with or without the acme-companion service. +# +# See more info here: https://github.com/nginx-proxy/nginx-proxy + services: nginx-proxy: container_name: "nginx-proxy" image: "nginxproxy/nginx-proxy" + restart: "always" 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" + networks: + - "nginx-proxy-network" ports: - "80:80" - "443:443" - acme-companion: - container_name: "acme-companion" - image: "nginxproxy/acme-companion" - depends_on: - - "nginx-proxy" - volumes: - - "acme:/etc/acme.sh" - - "certs:/etc/nginx/certs" - - "dhparam:/etc/nginx/dhparam" - - "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" - volumes: - acme: certs: + name: "certs" dhparam: + name: "dhparam" vhost: + name: "vhost" html: + name: "html" + +networks: + nginx-proxy-network: + name: "nginx-proxy-network" |