docker-compose.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. command: ["redis-server", "--appendonly", "yes"]
  36. volumes:
  37. - redis-data:/data
  38. networks:
  39. - redis
  40. ports:
  41. - "6389"
  42. redis-legacy:
  43. image: redis:3
  44. command: ["redis-server", "--appendonly", "yes"]
  45. volumes:
  46. - redis-legacy-data:/data
  47. networks:
  48. - redis
  49. ports:
  50. - "6388"
  51. solr-new:
  52. build: ./Docker/solr/
  53. environment:
  54. - SOLR_HOME=/opt/solr/server/solr
  55. volumes:
  56. - "${SOLR_CORES}:/opt/solr/server/solr"
  57. # - solr-cores:/opt/solr/server/solr
  58. networks:
  59. - solr
  60. ports:
  61. - 8985:8983
  62. solr-legacy:
  63. build: ./Docker/solr-legacy/
  64. volumes:
  65. - solr-cores-legacy:/opt/solr/server/solr
  66. networks:
  67. - solr
  68. ports:
  69. - 8983:8983
  70. php:
  71. build: ./Docker/php/
  72. expose:
  73. - 9000
  74. - 9001
  75. user: ${USER_UID}:${USER_GID}
  76. volumes:
  77. - php-user-data:/home/${USER_UNAME}
  78. - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
  79. - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
  80. - "${LOG_ROOT}/php:/var/log:rw"
  81. - "${XDEBUG_INI}:/usr/local/etc/php/conf.d/xdebug.ini"
  82. working_dir: "/var/www/html/d8.materio.com/public_html"
  83. networks:
  84. - database
  85. - redis
  86. - server
  87. - solr
  88. # extra_hosts:
  89. # - "host.docker.internal:192.168.144.4"
  90. # - "testhost:192.168.0.21"
  91. depends_on:
  92. - mysql
  93. - mysql-legacy
  94. - redis
  95. - solr-new
  96. php-legacy:
  97. build: ./Docker/php-legacy/
  98. expose:
  99. - 9000
  100. volumes:
  101. - php-legacy-root-data:/root
  102. - "${LEGACY_ROOT}:/var/www/html"
  103. - "${LOG_ROOT}/php-legacy:/var/log:rw"
  104. working_dir: "/var/www/html"
  105. networks:
  106. - database
  107. - redis
  108. - server
  109. - solr
  110. depends_on:
  111. - mysql-legacy
  112. - redis-legacy
  113. - solr-legacy
  114. phpmyadmin:
  115. image: phpmyadmin/phpmyadmin
  116. ports:
  117. - 8891:80
  118. networks:
  119. - database
  120. depends_on:
  121. - mysql
  122. - mysql-legacy
  123. environment:
  124. PMA_HOSTS: mysql,mysql-legacy
  125. nginx:
  126. build: ./Docker/nginx/
  127. ports:
  128. - 8890:80
  129. volumes:
  130. - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
  131. - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
  132. - "${LOG_ROOT}:/var/log:rw"
  133. working_dir: "/var/www/html/d8.materio.com/public_html"
  134. networks:
  135. - server
  136. - solr
  137. depends_on:
  138. - php
  139. nginx-legacy:
  140. build: ./Docker/nginx-legacy/
  141. ports:
  142. - 8880:80
  143. volumes:
  144. - "${LEGACY_ROOT}:/var/www/html"
  145. - "${LOG_ROOT}:/var/log:rw"
  146. networks:
  147. - server
  148. - solr
  149. depends_on:
  150. - php-legacy
  151. npm:
  152. build: ./Docker/npm
  153. user: ${USER_UID}:${USER_GID}
  154. volumes:
  155. - "${PROJECT_ROOT}:/app"
  156. - npm-user-data:/home/${USER_UNAME}
  157. ports:
  158. - 8788:8788
  159. working_dir: "/app"
  160. volumes:
  161. php-user-data:
  162. php-legacy-root-data:
  163. db-data:
  164. db-data-legacy:
  165. redis-data:
  166. redis-legacy-data:
  167. solr-cores-legacy:
  168. solr-cores:
  169. npm-user-data:
  170. networks:
  171. database:
  172. redis:
  173. server:
  174. solr: