docker-compose pour le déploiement en des images docker des microservices métiers et des services utilitaires

docker-compose.yml 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. version: '3.4'
  2. services:
  3. microservices-db:
  4. image: mysql:8.0
  5. container_name: microservices-db
  6. restart: always
  7. ports:
  8. - "3306:3306"
  9. networks:
  10. - microservices-network
  11. environment:
  12. MYSQL_ROOT_PASSWORD: pwd
  13. volumes:
  14. - services-db:/var/lib/mysql
  15. microservices-config-service:
  16. image: microservices-config-service:latest
  17. container_name: microservices-config-service
  18. ports:
  19. - "8280:8280"
  20. networks:
  21. - microservices-network
  22. build:
  23. context: ../backend-frontend-app/spring-project-back/microservices-config-service
  24. dockerfile: Dockerfile
  25. microservices-registration-service:
  26. image: microservices-registration-service:latest
  27. container_name: microservices-registration-service
  28. build:
  29. context: ../backend-frontend-app/spring-project-back/microservices-registration-service
  30. dockerfile: Dockerfile
  31. ports:
  32. - "8761:8761"
  33. networks:
  34. - microservices-network
  35. depends_on:
  36. microservices-config-service:
  37. condition: service_completed_successfully
  38. backend-frontend-gateway-service:
  39. image: backend-frontend-gateway-service:latest
  40. container_name: backend-frontend-gateway-service
  41. ports:
  42. - "8281:8281"
  43. build:
  44. context: ../backend-frontend-app/spring-project-back/backend-frontend-gateway-service
  45. dockerfile: Dockerfile
  46. depends_on:
  47. microservices-config-service:
  48. condition: service_completed_successfully
  49. microservices-registration-service:
  50. condition: service_completed_successfully
  51. networks:
  52. - microservices-network
  53. clean-archi-business-service-address:
  54. image: clean-archi-business-service-address:latest
  55. container_name: clean-archi-business-service-address
  56. build:
  57. context: ..//backend-frontend-app/spring-project-back/clean-archi-business-service-address
  58. dockerfile: Dockerfile
  59. ports:
  60. - "8282:8282"
  61. depends_on:
  62. microservices-db:
  63. condition: service_completed_successfully
  64. microservices-config-service:
  65. condition: service_completed_successfully
  66. microservices-registration-service:
  67. condition: service_completed_successfully
  68. networks:
  69. - microservices-network
  70. clean-archi-business-service-company:
  71. image: clean-archi-business-service-company:latest
  72. container_name: clean-archi-business-service-company
  73. build:
  74. context: ../backend-frontend-app/spring-project-back/clean-archi-business-service-company
  75. dockerfile: Dockerfile
  76. ports:
  77. - "8284:8284"
  78. depends_on:
  79. microservices-db:
  80. condition: service_completed_successfully
  81. microservices-config-service:
  82. condition: service_completed_successfully
  83. microservices-registration-service:
  84. condition: service_completed_successfully
  85. networks:
  86. - microservices-network
  87. clean-archi-business-service-employee:
  88. image: clean-archi-business-service-employee:latest
  89. container_name: clean-archi-business-service-employee
  90. build:
  91. context: ../backend-frontend-app/spring-project-back/clean-archi-business-service-employee
  92. dockerfile: Dockerfile
  93. ports:
  94. - "8283:8283"
  95. depends_on:
  96. microservices-db:
  97. condition: service_completed_successfully
  98. microservices-config-service:
  99. condition: service_completed_successfully
  100. microservices-registration-service:
  101. condition: service_completed_successfully
  102. networks:
  103. - microservices-network
  104. clean-archi-business-service-project:
  105. image: clean-archi-business-service-project:latest
  106. container_name: clean-archi-business-service-project
  107. build:
  108. context: ../backend-frontend-app/spring-project-back/clean-archi-business-service-project
  109. dockerfile: Dockerfile
  110. ports:
  111. - "8285:8285"
  112. depends_on:
  113. microservices-db:
  114. condition: service_completed_successfully
  115. microservices-config-service:
  116. condition: service_completed_successfully
  117. microservices-registration-service:
  118. condition: service_completed_successfully
  119. networks:
  120. - microservices-network
  121. networks:
  122. microservices-network:
  123. volumes:
  124. services-db:

Powered by TurnKey Linux.