From 8215f0d882bc933ac6c7e4c86907b04c8bd39fb4 Mon Sep 17 00:00:00 2001
From: Vincent Massol <vincent@massol.net>
Date: Fri, 24 Feb 2017 09:57:32 +0100
Subject: [PATCH]  XDOCKER-11: Stop using Docker link feature
 (legacy/deprecated)  * FIxed missing modification from past commit

---
 README.md                                   | 9 +++++++++
 xwiki-mysql-tomcat/docker-compose-using.yml | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 6ce10c5..820422c 100644
--- a/README.md
+++ b/README.md
@@ -56,6 +56,7 @@ docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /my/own/xwiki:/usr/local/
 Be careful to use the same MySQL username, password and database names that you've used on the first command to start the MySQL container. Also, please don't forget to add a '-e DB_CONTAINER_NAME=' env variable with the name of the previously created MySQL container so that XWiki knows where its database is.
 
 At this point, XWiki should start in interactive mode. Should you wish to run it in "detached mode", just add a "-d" flag in the previous command.
+
 ```console
 docker run -d --net=xwiki-nw ...
 ```
@@ -76,6 +77,9 @@ For reference here's a minimal Docker Compose file using MySQL that you could us
 
 ```yaml
 version: '2'
+networks:
+  bridge:
+    driver: bridge
 services:
   web:
     image: "xwiki:mysql-tomcat"
@@ -86,8 +90,11 @@ services:
     environment:
       - MYSQL_USER=xwiki
       - MYSQL_PASSWORD=xwiki
+      - DB_CONTAINER_NAME=xwiki-mysql
     volumes:
       - xwiki-data:/usr/local/xwiki
+    networks:
+      - bridge
   db:
     image: "mysql:5.7"
     volumes:
@@ -98,6 +105,8 @@ services:
       - MYSQL_USER=xwiki
       - MYSQL_PASSWORD=xwiki
       - MYSQL_DATABASE=xwiki
+    networks:
+      - bridge
 volumes:
   mysql-data: {}
   xwiki-data: {}
diff --git a/xwiki-mysql-tomcat/docker-compose-using.yml b/xwiki-mysql-tomcat/docker-compose-using.yml
index b0d8bcc..3842218 100644
--- a/xwiki-mysql-tomcat/docker-compose-using.yml
+++ b/xwiki-mysql-tomcat/docker-compose-using.yml
@@ -30,7 +30,7 @@ services:
       - db
     ports:
       - "8080:8080"
-    # The MYSQL_USER/MYSQL_PASSWORD variables are used in the hibernate.cfg.xml file.
+    # The MYSQL_USER/MYSQL_PASSWORD/DB_CONTAINER_NAME variables are used in the hibernate.cfg.xml file.
     environment:
       - MYSQL_USER=xwiki
       - MYSQL_PASSWORD=xwiki
-- 
GitLab