docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. version: "3"
  2. services:
  3. web:
  4. image: nginx:latest
  5. restart: always
  6. ports:
  7. - "80:80"
  8. volumes:
  9. - ./src:/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. - ./src:/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. volumes:
  34. - "./mysql:/var/lib/mysql"
  35. - "./src/application/db/migrations/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
  36. networks:
  37. - empire
  38. environment:
  39. MYSQL_ROOT_HOST: "%"
  40. MYSQL_DATABASE: "empire"
  41. MYSQL_USER: "test"
  42. MYSQL_PASSWORD: "test"
  43. MYSQL_ROOT_PASSWORD: "test"
  44. MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  45. phpmyadmin:
  46. image: phpmyadmin/phpmyadmin:latest
  47. restart: always
  48. environment:
  49. PMA_HOST: mysql
  50. PMA_USER: root
  51. PMA_PASSWORD: test
  52. networks:
  53. - empire
  54. ports:
  55. - "81:80"
  56. depends_on:
  57. - mysql
  58. links:
  59. - mysql
  60. networks:
  61. empire:
  62. driver: bridge