Browse Source

new commit

placidenduwayo 1 year ago
parent
commit
62a26e4567
2 changed files with 36 additions and 15 deletions
  1. 2
    2
      README.md
  2. 34
    13
      docker-compose.yml

+ 2
- 2
README.md View File

@@ -1,6 +1,6 @@
1 1
 #déploiement
2 2
 Fichier **docker-compose** pour le déploiement de la partie backend de l'application fullstask dans git: 
3
-- https://gitea.natan.fr/placidenduwayo/bootcamp-fullstack-application-springboot-angular.git
3
+- [fullstack application](https://gitea.natan.fr/placidenduwayo/fullstack-application-springboot-angular.git)
4 4
 ## spring cloud config server
5 5
 Les fichiers de configurations pour le server de configiration cloud dans le git:
6
-- https://gitea.natan.fr/placidenduwayo/bootcamp-fullstack-application-springboot-angular-confg-service.git
6
+- [configuration files] (https://gitea.natan.fr/placidenduwayo/fullstack-application-springboot-angular-config-service.git)

+ 34
- 13
docker-compose.yml View File

@@ -12,6 +12,8 @@ services:
12 12
       - microservices-network
13 13
     environment:
14 14
       MYSQL_ROOT_PASSWORD: pwd
15
+    volumes:
16
+      - services-db:/var/lib/mysql
15 17
     
16 18
   microservices-config-service:
17 19
     image: microservices-config-service:latest
@@ -35,9 +37,8 @@ services:
35 37
     networks:
36 38
       - microservices-network
37 39
     depends_on:
38
-      - microservices-config-service
39
-    links:
40
-      - microservices-config-service
40
+      microservices-config-service:
41
+       condition: service_completed_successfully
41 42
 
42 43
   backend-frontend-gateway-service:
43 44
     image: backend-frontend-gateway-service:latest
@@ -48,8 +49,10 @@ services:
48 49
       context: ../backend-frontend-app/spring-project-back/backend-frontend-gateway-service
49 50
       dockerfile: Dockerfile
50 51
     depends_on:
51
-      - microservices-config-service
52
-      - microservices-registration-service
52
+      microservices-config-service:
53
+        condition: service_completed_successfully
54
+      microservices-registration-service:
55
+        condition: service_completed_successfully
53 56
     networks:
54 57
       - microservices-network
55 58
 
@@ -62,8 +65,12 @@ services:
62 65
     ports:
63 66
       - "8282:8282"
64 67
     depends_on:
65
-      - microservices-config-service
66
-      - microservices-registration-service
68
+      microservices-db:
69
+        condition: service_completed_successfully
70
+      microservices-config-service:
71
+        condition: service_completed_successfully
72
+      microservices-registration-service:
73
+        condition: service_completed_successfully
67 74
     networks:
68 75
       - microservices-network
69 76
     
@@ -76,8 +83,12 @@ services:
76 83
     ports:
77 84
       - "8284:8284"
78 85
     depends_on:
79
-      - microservices-config-service
80
-      - microservices-registration-service
86
+      microservices-db:
87
+        condition: service_completed_successfully
88
+      microservices-config-service:
89
+        condition: service_completed_successfully
90
+      microservices-registration-service:
91
+        condition: service_completed_successfully
81 92
     networks:
82 93
       - microservices-network
83 94
   
@@ -90,8 +101,12 @@ services:
90 101
     ports:
91 102
       - "8283:8283"
92 103
     depends_on:
93
-      - microservices-config-service
94
-      - microservices-registration-service
104
+      microservices-db:
105
+        condition: service_completed_successfully
106
+      microservices-config-service:
107
+        condition: service_completed_successfully
108
+      microservices-registration-service:
109
+        condition: service_completed_successfully
95 110
     networks:
96 111
       - microservices-network
97 112
   
@@ -104,10 +119,16 @@ services:
104 119
     ports:
105 120
       - "8285:8285"
106 121
     depends_on:
107
-      - microservices-config-service
108
-      - microservices-registration-service
122
+      microservices-db:
123
+        condition: service_completed_successfully
124
+      microservices-config-service:
125
+        condition: service_completed_successfully
126
+      microservices-registration-service:
127
+        condition: service_completed_successfully
109 128
     networks:
110 129
       - microservices-network
111 130
 
112 131
 networks:
113 132
   microservices-network:
133
+volumes:
134
+  services-db:

Powered by TurnKey Linux.