docker-compose.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. version: '2'
  2. services:
  3. mysql:
  4. image: mysql:5.7
  5. ports:
  6. - 3306:3306
  7. volumes:
  8. - /mydata/mysql/data:/var/lib/mysql
  9. - /mydata/mysql/conf:/etc/mysql
  10. - /mydata/mysql/log:/var/log/mysql
  11. environment:
  12. - MYSQL_ROOT_PASSWORD:root
  13. elasticsearch:
  14. image: elasticsearch:2.4
  15. ports:
  16. - 9200:9200
  17. - 9300:9300
  18. volumes:
  19. - /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins
  20. - /mydata/elasticsearch/data:/usr/share/elasticsearch/data
  21. redis:
  22. image: redis:3.2
  23. ports:
  24. - 6379:6379
  25. volumes:
  26. - /mydata/redis/data:/data
  27. command: redis-server --appendonly yes
  28. mongo:
  29. image: mongo:3.2
  30. ports:
  31. - 27017:27017
  32. volumes:
  33. - /mydata/mongo/db:/data/db
  34. nginx:
  35. image: nginx:1.10
  36. ports:
  37. - 80:80
  38. volumes:
  39. - /mydata/nginx/html:/usr/share/nginx/html
  40. - /mydata/nginx/logs:/var/log/nginx
  41. - /mydata/nginx/conf:/etc/nginx
  42. mall-admin:
  43. image: mall/mall-admin:1.0-SNAPSHOT
  44. ports:
  45. - 8080:8080
  46. links:
  47. - mysql:db
  48. mall-search:
  49. image: mall/mall-search:1.0-SNAPSHOT
  50. ports:
  51. - 8081:8081
  52. links:
  53. - elasticsearch:es
  54. - mysql:db
  55. mall-portal:
  56. image: mall/mall-portal:1.0-SNAPSHOT
  57. ports:
  58. - 8085:8085
  59. links:
  60. - redis:redis
  61. - mongo:mongo
  62. - mysql:db