docker-compose.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. php:
  42. build: ./Docker/php/
  43. expose:
  44. - 9000
  45. volumes:
  46. - php-root-data:/root
  47. - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
  48. - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
  49. working_dir: "/var/www/html/d8.materio.com/public_html"
  50. networks:
  51. - database
  52. - redis
  53. - server
  54. depends_on:
  55. - mysql
  56. - mysql-legacy
  57. - redis
  58. phpmyadmin:
  59. image: phpmyadmin/phpmyadmin
  60. ports:
  61. - 8891:80
  62. networks:
  63. - database
  64. depends_on:
  65. - mysql
  66. - mysql-legacy
  67. environment:
  68. PMA_HOSTS: mysql,mysql-legacy
  69. nginx:
  70. build: ./Docker/nginx/
  71. ports:
  72. - 8890:80
  73. volumes:
  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}:/var/log:rw"
  77. working_dir: "/var/www/html/d8.materio.com/public_html"
  78. networks:
  79. - server
  80. depends_on:
  81. - php
  82. volumes:
  83. php-root-data:
  84. db-data:
  85. db-data-legacy:
  86. redis-data:
  87. networks:
  88. database:
  89. redis:
  90. server: