From f38bd7166638ed75a5c9efbdaec4f0af65781e2c Mon Sep 17 00:00:00 2001 From: _den <_den@outlook.com> Date: Sun, 12 Dec 2021 17:53:59 +1000 Subject: [PATCH] fixed volumes config for compose v3 --- docker-compose.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d1c1c38..054e63a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,7 @@ services: - conf:/etc/nginx/conf.d - vhost:/etc/nginx/vhost.d - html:/usr/share/nginx/html - - certs:/etc/nginx/certs + - certs:/etc/nginx/certs:ro logging: driver: none @@ -40,9 +40,11 @@ services: container_name: dockergen restart: always command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf - volumes_from: - - nginx 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:/var/run/docker.sock:ro letsencrypt: @@ -51,9 +53,12 @@ services: restart: always environment: NGINX_DOCKER_GEN_CONTAINER: dockergen - volumes_from: - - nginx - - dockergen + volumes: + - conf:/etc/nginx/conf.d + - vhost:/etc/nginx/vhost.d + - html:/usr/share/nginx/html + - certs:/etc/nginx/certs:rw + - /var/run/docker.sock:/var/run/docker.sock:ro volumes: conf: