docker-compose.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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}:/docker-entrypoint-initdb.d/drupal.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. redis:
  19. image: redis:4
  20. volumes:
  21. - redis-data:/data
  22. networks:
  23. - redis
  24. ports:
  25. - "6389"
  26. php:
  27. build: ./Docker/php/
  28. expose:
  29. - 9000
  30. volumes:
  31. - php-root-data:/root
  32. - "${PROJECT_ROOT}:/var/www/html"
  33. - "${LOG_ROOT}/php:/var/log:rw"
  34. working_dir: "/var/www/html"
  35. networks:
  36. - database
  37. - redis
  38. - server
  39. depends_on:
  40. - mysql
  41. - redis
  42. phpmyadmin:
  43. image: phpmyadmin/phpmyadmin
  44. ports:
  45. - 8891:80
  46. networks:
  47. - database
  48. depends_on:
  49. - mysql
  50. environment:
  51. PMA_HOSTS: mysql
  52. nginx:
  53. build: ./Docker/nginx/
  54. ports:
  55. - 8890:80
  56. volumes:
  57. - "${PROJECT_ROOT}:/var/www/html/"
  58. - "${LOG_ROOT}:/var/log:rw"
  59. working_dir: "/var/www/html/web"
  60. networks:
  61. - server
  62. depends_on:
  63. - php
  64. volumes:
  65. php-root-data:
  66. db-data:
  67. redis-data:
  68. networks:
  69. database:
  70. redis:
  71. server: