docker-compose.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. - "${DB_IMPORTE_FILE}:/docker-entrypoint-initdb.d/db.sql"
  9. networks:
  10. - database
  11. environment:
  12. MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
  13. MYSQL_DATABASE: "${DB_NAME}"
  14. MYSQL_USER: "${DB_USERNAME}"
  15. MYSQL_PASSWORD: "${DB_PASSWORD}"
  16. redis:
  17. image: redis:3
  18. volumes:
  19. - redis-data:/data
  20. networks:
  21. - redis
  22. ports:
  23. - "6379"
  24. php:
  25. build: ./Docker/php/
  26. expose:
  27. - 9000
  28. volumes:
  29. - php-root-data:/root
  30. - "${PROJECT_ROOT}:/var/www/html"
  31. networks:
  32. - database
  33. - server
  34. - redis
  35. depends_on:
  36. - mysql
  37. phpmyadmin:
  38. image: phpmyadmin/phpmyadmin
  39. ports:
  40. - 8881:80
  41. networks:
  42. - database
  43. depends_on:
  44. - mysql
  45. environment:
  46. PMA_HOST: mysql
  47. nginx:
  48. build: ./Docker/nginx/
  49. ports:
  50. - 8880:80
  51. volumes:
  52. - "${PROJECT_ROOT}:/var/www/html"
  53. - "${LOG_ROOT}:/var/log:rw"
  54. networks:
  55. - server
  56. depends_on:
  57. - php
  58. volumes:
  59. db-data:
  60. redis-data:
  61. php-root-data:
  62. networks:
  63. database:
  64. redis:
  65. server: