docker-compose.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. version: "3.5"
  2. services:
  3. mysql:
  4. image: mariadb:latest
  5. volumes:
  6. - db-data:/var/lib/mysql
  7. - ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
  8. - ./Docker/mysql/bashrc:/root/.bashrc:ro
  9. - "${DB_IMPORTE_FILE_D8}:/docker-entrypoint-initdb.d/materio_d8.sql"
  10. networks:
  11. - database
  12. hostname: mysql
  13. environment:
  14. MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
  15. MYSQL_DATABASE: "${DB_NAME}"
  16. MYSQL_USER: "${DB_USERNAME}"
  17. MYSQL_PASSWORD: "${DB_PASSWORD}"
  18. mysql-legacy:
  19. image: mariadb:latest
  20. volumes:
  21. - db-data-legacy:/var/lib/mysql
  22. - ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
  23. - ./Docker/mysql/bashrc:/root/.bashrc:ro
  24. - "${DB_IMPORTE_FILE_D7}:/docker-entrypoint-initdb.d/materio_d7.sql"
  25. networks:
  26. - database
  27. hostname: mysql-legacy
  28. environment:
  29. MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
  30. MYSQL_DATABASE: "${DB_LEGACY_NAME}"
  31. MYSQL_USER: "${DB_USERNAME}"
  32. MYSQL_PASSWORD: "${DB_PASSWORD}"
  33. redis:
  34. image: redis:4
  35. volumes:
  36. - redis-data:/data
  37. networks:
  38. - redis
  39. ports:
  40. - "6389"
  41. redis-legacy:
  42. image: redis:3
  43. volumes:
  44. - redis-legacy-data:/data
  45. networks:
  46. - redis
  47. ports:
  48. - "6388"
  49. solr-new:
  50. build: ./Docker/solr/
  51. environment:
  52. - SOLR_HOME=/opt/solr/server/solr
  53. volumes:
  54. - "${SOLR_CORES}:/opt/solr/server/solr"
  55. # - solr-cores:/opt/solr/server/solr
  56. networks:
  57. - solr
  58. ports:
  59. - 8985:8983
  60. solr-legacy:
  61. build: ./Docker/solr-legacy/
  62. volumes:
  63. - solr-cores-legacy:/opt/solr/server/solr
  64. networks:
  65. - solr
  66. ports:
  67. - 8983:8983
  68. php:
  69. build: ./Docker/php/
  70. expose:
  71. - 9000
  72. volumes:
  73. - php-root-data:/root
  74. - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
  75. - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
  76. - "${LOG_ROOT}/php:/var/log:rw"
  77. working_dir: "/var/www/html/d8.materio.com/public_html"
  78. networks:
  79. - database
  80. - redis
  81. - server
  82. - solr
  83. depends_on:
  84. - mysql
  85. - mysql-legacy
  86. - redis
  87. - solr-new
  88. php-legacy:
  89. build: ./Docker/php-legacy/
  90. expose:
  91. - 9000
  92. volumes:
  93. - php-legacy-root-data:/root
  94. - "${LEGACY_ROOT}:/var/www/html"
  95. - "${LOG_ROOT}/php-legacy:/var/log:rw"
  96. working_dir: "/var/www/html"
  97. networks:
  98. - database
  99. - redis
  100. - server
  101. - solr
  102. depends_on:
  103. - mysql-legacy
  104. - redis-legacy
  105. - solr-legacy
  106. phpmyadmin:
  107. image: phpmyadmin/phpmyadmin
  108. ports:
  109. - 8891:80
  110. networks:
  111. - database
  112. depends_on:
  113. - mysql
  114. - mysql-legacy
  115. environment:
  116. PMA_HOSTS: mysql,mysql-legacy
  117. nginx:
  118. build: ./Docker/nginx/
  119. ports:
  120. - 8890:80
  121. volumes:
  122. - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
  123. - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
  124. - "${LOG_ROOT}:/var/log:rw"
  125. working_dir: "/var/www/html/d8.materio.com/public_html"
  126. networks:
  127. - server
  128. - solr
  129. depends_on:
  130. - php
  131. nginx-legacy:
  132. build: ./Docker/nginx-legacy/
  133. ports:
  134. - 8880:80
  135. volumes:
  136. - "${LEGACY_ROOT}:/var/www/html"
  137. - "${LOG_ROOT}:/var/log:rw"
  138. networks:
  139. - server
  140. - solr
  141. depends_on:
  142. - php-legacy
  143. volumes:
  144. php-root-data:
  145. php-legacy-root-data:
  146. db-data:
  147. db-data-legacy:
  148. redis-data:
  149. redis-legacy-data:
  150. solr-cores-legacy:
  151. solr-cores:
  152. networks:
  153. database:
  154. redis:
  155. server:
  156. solr: