From 8cf97fe43c3ad5b004ee179ceb0a8911e0a3ae17 Mon Sep 17 00:00:00 2001
From: Quentin Duchemin <quentinduchemin@tuta.io>
Date: Tue, 26 May 2020 23:49:59 +0200
Subject: [PATCH] [Etherpad] Use networks rather than links to protect the
 databases

---
 pica-etherpad/docker-compose.yml | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/pica-etherpad/docker-compose.yml b/pica-etherpad/docker-compose.yml
index fcee7421..b1573bc6 100755
--- a/pica-etherpad/docker-compose.yml
+++ b/pica-etherpad/docker-compose.yml
@@ -2,9 +2,13 @@ version : "2.4"
 
 volumes:
   etherpad-db:
-    external: true
+    name: etherpad-db
+  etherpad-week-db:
+    name: etherpad-week-db
 
 networks:
+  standard:
+  week:
   docker_default:
     external: true
     name: "docker_default"
@@ -15,8 +19,6 @@ services:
     container_name: etherpad-app
     depends_on:
       - etherpad-db
-    links:
-      - etherpad-db:etherpad-db
     security_opt:
       - no-new-privileges
     mem_limit: "2048m"
@@ -40,6 +42,7 @@ services:
     restart: unless-stopped
     networks:
       - docker_default
+      - standard
 
   etherpad-db:
     image: registry.picasoft.net/pica-etherpad-db:mysql8.picapatch2
@@ -56,15 +59,13 @@ services:
     # See https://stackoverflow.com/questions/41134785/how-to-solve-mysql-warning-innodb-page-cleaner-1000ms-intended-loop-took-xxx
     command: --innodb_lru_scan_depth=128 --default-authentication-plugin=mysql_native_password
     networks:
-      - docker_default
+      - standard
 
   etherpad-week-app:
     image: registry.picasoft.net/pica-etherpad:1.8.4
     container_name: etherpad-week-app
     depends_on:
       - etherpad-week-db
-    links:
-      - etherpad-week-db:etherpad-week-db
     security_opt:
       - no-new-privileges
     mem_limit: "2048m"
@@ -88,6 +89,7 @@ services:
     restart: unless-stopped
     networks:
       - docker_default
+      - week
 
   etherpad-week-db:
     image: registry.picasoft.net/pica-etherpad-db:mysql8.picapatch2
@@ -104,4 +106,4 @@ services:
     # See https://stackoverflow.com/questions/41134785/how-to-solve-mysql-warning-innodb-page-cleaner-1000ms-intended-loop-took-xxx
     command: --innodb_lru_scan_depth=128 --default-authentication-plugin=mysql_native_password
     networks:
-      - docker_default
+      - week
-- 
GitLab