docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. version: '2'
  2. services:
  3. mall4j-mysql:
  4. build:
  5. context: ./db
  6. environment:
  7. MYSQL_ROOT_PASSWORD: root
  8. restart: always
  9. container_name: mall4j-mysql
  10. ports:
  11. - 3306:3306
  12. volumes:
  13. - ./mall4j-mysql:/var/lib/mysql
  14. command: --lower_case_table_names=1
  15. mall4j-redis:
  16. image: redis:5.0
  17. restart: always
  18. container_name: mall4j-redis
  19. ports:
  20. - 6379:6379
  21. mall4j-api:
  22. build:
  23. context: ./yami-shop-api
  24. restart: always
  25. container_name: mall4j-api
  26. image: mall4j-api
  27. ports:
  28. - 8112:8112
  29. depends_on:
  30. - mall4j-redis
  31. - mall4j-mysql
  32. links:
  33. - "mall4j-redis"
  34. - "mall4j-mysql"
  35. mall4j-multishop:
  36. build:
  37. context: ./yami-shop-multishop
  38. restart: always
  39. container_name: mall4j-multishop
  40. image: mall4j-multishop
  41. ports:
  42. - 8113:8113
  43. depends_on:
  44. - mall4j-redis
  45. - mall4j-mysql
  46. links:
  47. - "mall4j-redis"
  48. - "mall4j-mysql"
  49. mall4j-platform:
  50. build:
  51. context: ./yami-shop-platform
  52. restart: always
  53. container_name: mall4j-platform
  54. image: mall4j-platform
  55. ports:
  56. - 8114:8114
  57. depends_on:
  58. - mall4j-redis
  59. - mall4j-mysql
  60. links:
  61. - "mall4j-redis"
  62. - "mall4j-mysql"