From e194939cbbfa0dcf34da7bb5e522c413aa41f630 Mon Sep 17 00:00:00 2001
From: Daniel Crazzolara <crazzolaradaniel@gmail.com>
Date: Fri, 28 Jul 2023 15:12:45 +0200
Subject: [PATCH 1/3] Added static ip to avoid conflicts with gitlab

---
 src/main/docker/gitsearch.yml | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/main/docker/gitsearch.yml b/src/main/docker/gitsearch.yml
index f30e95eb4..aaf21d084 100644
--- a/src/main/docker/gitsearch.yml
+++ b/src/main/docker/gitsearch.yml
@@ -46,8 +46,10 @@ services:
       - sharing_mysql
       # - sharing_elasticsearch
     networks:
-      - backend
-      - frontend
+      frontend:
+          ipv4_address: 172.22.1.51
+      backend:
+          ipv4_address: 172.22.2.51
   sharing_mysql:
     image: mysql:8.0.20
     container_name: sharing_mysql
@@ -79,8 +81,10 @@ services:
       - PGDATA=/var/lib/postgresql/data/pgdata
     restart: always
     networks:
-      - backend
-      - frontend
+      frontend:
+          ipv4_address: 172.22.1.52
+      backend:
+          ipv4_address: 172.22.2.52
     depends_on:
       - sharing_mysql
   keycloak:
@@ -111,8 +115,10 @@ services:
     depends_on:
       - postgres
     networks:
-      - backend
-      - frontend
+      frontend:
+          ipv4_address: 172.22.1.53
+      backend:
+          ipv4_address: 172.22.2.53
   docker-hoster:
     image: dvdarias/docker-hoster
     volumes:
@@ -120,8 +126,10 @@ services:
       - /var/run/docker.sock:/tmp/docker.sock
     restart: always
     networks:
-      - backend
-      - frontend
+      frontend:
+          ipv4_address: 172.22.1.54
+      backend:
+          ipv4_address: 172.22.2.54
 
   # sharing_elasticsearch:
   #   image: 'docker.elastic.co/elasticsearch/elasticsearch:7.17.6'
-- 
GitLab


From 9c8ad93aad34079f28536f3a3a36a0e9b3376fde Mon Sep 17 00:00:00 2001
From: Daniel Crazzolara <crazzolaradaniel@gmail.com>
Date: Mon, 7 Aug 2023 11:06:13 +0200
Subject: [PATCH 2/3] Removed fixed ips

---
 src/main/docker/elasticsearch.yml |  3 +--
 src/main/docker/gitsearch.yml     | 26 ++++++++++----------------
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/src/main/docker/elasticsearch.yml b/src/main/docker/elasticsearch.yml
index b8133c05f..625b40137 100644
--- a/src/main/docker/elasticsearch.yml
+++ b/src/main/docker/elasticsearch.yml
@@ -25,8 +25,7 @@ services:
         soft: -1
         hard: -1
     networks:
-      backend:
-        ipv4_address: 172.22.2.24
+      - backend
   # kibana:
   #   depends_on:
   #     - sharing_elasticsearch
diff --git a/src/main/docker/gitsearch.yml b/src/main/docker/gitsearch.yml
index aaf21d084..46098403e 100644
--- a/src/main/docker/gitsearch.yml
+++ b/src/main/docker/gitsearch.yml
@@ -46,10 +46,8 @@ services:
       - sharing_mysql
       # - sharing_elasticsearch
     networks:
-      frontend:
-          ipv4_address: 172.22.1.51
-      backend:
-          ipv4_address: 172.22.2.51
+      - backend
+      - frontend
   sharing_mysql:
     image: mysql:8.0.20
     container_name: sharing_mysql
@@ -81,10 +79,8 @@ services:
       - PGDATA=/var/lib/postgresql/data/pgdata
     restart: always
     networks:
-      frontend:
-          ipv4_address: 172.22.1.52
-      backend:
-          ipv4_address: 172.22.2.52
+      - backend
+      - frontend
     depends_on:
       - sharing_mysql
   keycloak:
@@ -115,10 +111,8 @@ services:
     depends_on:
       - postgres
     networks:
-      frontend:
-          ipv4_address: 172.22.1.53
-      backend:
-          ipv4_address: 172.22.2.53
+      - backend
+      - frontend
   docker-hoster:
     image: dvdarias/docker-hoster
     volumes:
@@ -126,10 +120,10 @@ services:
       - /var/run/docker.sock:/tmp/docker.sock
     restart: always
     networks:
-      frontend:
-          ipv4_address: 172.22.1.54
-      backend:
-          ipv4_address: 172.22.2.54
+      - backend
+      - frontend
+
+
 
   # sharing_elasticsearch:
   #   image: 'docker.elastic.co/elasticsearch/elasticsearch:7.17.6'
-- 
GitLab


From c7be27f585dbf2957782635ced4893d5f2d68a97 Mon Sep 17 00:00:00 2001
From: Daniel Crazzolara <crazzolaradaniel@gmail.com>
Date: Mon, 7 Aug 2023 11:10:17 +0200
Subject: [PATCH 3/3] removed empty lines

---
 src/main/docker/gitsearch.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/main/docker/gitsearch.yml b/src/main/docker/gitsearch.yml
index 46098403e..f30e95eb4 100644
--- a/src/main/docker/gitsearch.yml
+++ b/src/main/docker/gitsearch.yml
@@ -123,8 +123,6 @@ services:
       - backend
       - frontend
 
-
-
   # sharing_elasticsearch:
   #   image: 'docker.elastic.co/elasticsearch/elasticsearch:7.17.6'
   #   container_name: sharing_elasticsearch
-- 
GitLab