From ee075de0d47d0d6c89755bc4abfea2a0ad2ee27e Mon Sep 17 00:00:00 2001
From: pierreozoux <pierre@ozoux.net>
Date: Fri, 25 Nov 2016 12:56:11 +0000
Subject: [PATCH] migrates to version 2

---
 docker-compose.yml | 69 +++++++++++++++++++++++++---------------------
 1 file changed, 38 insertions(+), 31 deletions(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 2fc1a6c..1745e26 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,31 +1,38 @@
-discovery:
-  image: jwilder/docker-gen
-  volumes:
-    - "/var/run/docker.sock:/tmp/docker.sock:ro"
-    - "./templates:/etc/docker-gen/templates"
-    - "./haproxy:/etc/haproxy"
-  command: "-watch /etc/docker-gen/templates/haproxy.cfg.tmpl /etc/haproxy/haproxy.cfg"
-haproxy:
-  image: indiehosters/haproxy
-  volumes:
-    - "./haproxy:/etc/haproxy"
-    - "/dev/log:/dev/log"
-  links:
-    - letsencrypt
-  ports:
-    - "80:80"
-    - "443:443"
-letsencrypt-web:
-  image: nginx
-  volumes:
-    - "./acme-challenge:/usr/share/nginx/html/.well-known/acme-challenge:ro"
-letsencrypt:
-  image: indiehosters/letsencrypt
-  volumes:
-    - "./haproxy:/etc/haproxy"
-    - "./acme-challenge:/html-root/.well-known/acme-challenge/"
-    - "./certs:/var/certs"
-ocsp:
-  image: indiehosters/ocsp
-  volumes:
-    - "./haproxy:/etc/haproxy"
+version: '2'
+
+networks:
+  web:
+    external: true
+
+services:
+  discovery:
+    image: jwilder/docker-gen
+    volumes:
+      - "/var/run/docker.sock:/tmp/docker.sock:ro"
+      - "./templates:/etc/docker-gen/templates"
+      - "./haproxy:/etc/haproxy"
+    command: "-watch /etc/docker-gen/templates/haproxy.cfg.tmpl /etc/haproxy/haproxy.cfg"
+  haproxy:
+    image: indiehosters/haproxy
+    volumes:
+      - "./haproxy:/etc/haproxy"
+      - "/dev/log:/dev/log"
+    links:
+      - letsencrypt
+    ports:
+      - "80:80"
+      - "443:443"
+  letsencrypt-web:
+    image: nginx
+    volumes:
+      - "./acme-challenge:/usr/share/nginx/html/.well-known/acme-challenge:ro"
+  letsencrypt:
+    image: indiehosters/letsencrypt
+    volumes:
+      - "./haproxy:/etc/haproxy"
+      - "./acme-challenge:/html-root/.well-known/acme-challenge/"
+      - "./certs:/var/certs"
+  ocsp:
+    image: indiehosters/ocsp
+    volumes:
+      - "./haproxy:/etc/haproxy"
-- 
GitLab