From 037c87554f8b9945ae09a3d95acddd3df9a8eb72 Mon Sep 17 00:00:00 2001 From: Marcel Meier <48065786+seekermarcel@users.noreply.github.com> Date: Mon, 11 Jul 2022 13:11:18 +0200 Subject: [PATCH] added docker compose 3 example config for two containers in docker compose version 3 the volumes_from function is removed. Therefore another way is needed to connect both containers together. One option is to use the NGINX_PROXY_CONTAINER env variable --- docs/Docker-Compose.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/Docker-Compose.md b/docs/Docker-Compose.md index a988cdff..7419bac5 100644 --- a/docs/Docker-Compose.md +++ b/docs/Docker-Compose.md @@ -53,6 +53,46 @@ volumes: acme: ``` +```yaml +version: '3' + +services: + nginx-proxy: + image: nginxproxy/nginx-proxy + container_name: nginx-proxy + ports: + - "80:80" + - "443:443" + volumes: + - conf:/etc/nginx/conf.d + - vhost:/etc/nginx/vhost.d + - html:/usr/share/nginx/html + - certs:/etc/nginx/certs:ro + - /var/run/docker.sock:/tmp/docker.sock:ro + network_mode: bridge + + acme-companion: + image: nginxproxy/acme-companion + container_name: nginx-proxy_acme-companion + volumes: + - certs:/etc/nginx/certs + - html:/usr/share/nginx/html + - vhost:/etc/nginx/vhost.d + - acme:/etc/acme.sh + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - "DEFAULT_MAIL=mail@yourdomain.tld" + - "NGINX_PROXY_CONTAINER=nginx-proxy" + network_mode: bridge + +volumes: + conf: + vhost: + html: + certs: + acme: +``` + ### Three containers example ```yaml