summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker-compose.yml41
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