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. expose:
  21. - 9000
  22. volumes:
  23. - ./src:/var/www/html/
  24. networks:
  25. - empire
  26. depends_on:
  27. - mysql
  28. links:
  29. - mysql
  30. mysql:
  31. image: mysql:5.7
  32. platform: linux/x86_64
  33. command: --lower_case_table_names=1 --sql-mode=''
  34. restart: always
  35. volumes:
  36. - "./mysql:/var/lib/mysql"
  37. - "./src/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. ports:
  55. - "81:80"
  56. depends_on:
  57. - mysql
  58. links:
  59. - mysql
  60. networks:
  61. empire:
  62. driver: bridge