docker-compose.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. version: "3"
  2. services:
  3. web:
  4. image: nginx:latest
  5. restart: always
  6. ports:
  7. - "80:80"
  8. volumes:
  9. - ./empire:/var/www/html/
  10. - ./default.conf:/etc/nginx/conf.d/default.conf
  11. networks:
  12. - empire
  13. depends_on:
  14. - php
  15. links:
  16. - php
  17. php:
  18. build: ./php
  19. restart: always
  20. volumes:
  21. - ./empire:/var/www/html/
  22. networks:
  23. - empire
  24. depends_on:
  25. - mysql
  26. links:
  27. - mysql
  28. mysql:
  29. image: mysql:5.7
  30. platform: linux/x86_64
  31. command: --lower_case_table_names=1 --sql-mode=''
  32. restart: always
  33. ports:
  34. - "3306:3306"
  35. volumes:
  36. - "./mysql:/var/lib/mysql"
  37. - "./empire/application/db/migrations/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
  38. networks:
  39. - empire
  40. environment:
  41. MYSQL_ROOT_HOST: "%"
  42. MYSQL_DATABASE: "empire"
  43. MYSQL_USER: "test"
  44. MYSQL_PASSWORD: "test"
  45. MYSQL_ROOT_PASSWORD: "test"
  46. MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  47. phpmyadmin:
  48. image: phpmyadmin/phpmyadmin:latest
  49. restart: always
  50. environment:
  51. PMA_HOST: mysql
  52. PMA_USER: root
  53. PMA_PASSWORD: test
  54. networks:
  55. - empire
  56. ports:
  57. - "81:80"
  58. depends_on:
  59. - mysql
  60. links:
  61. - mysql
  62. networks:
  63. empire:
  64. driver: bridge