docker-compose-app.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. version: '3'
  2. services:
  3. mall-admin:
  4. image: mall/mall-admin:1.0-SNAPSHOT
  5. container_name: mall-admin
  6. ports:
  7. - 8080:8080
  8. volumes:
  9. - /mydata/app/mall-admin/logs:/var/logs
  10. - /etc/localtime:/etc/localtime
  11. environment:
  12. - 'TZ="Asia/Shanghai"'
  13. external_links:
  14. - mysql:db #可以用db这个域名访问mysql服务
  15. mall-search:
  16. image: mall/mall-search:1.0-SNAPSHOT
  17. container_name: mall-search
  18. ports:
  19. - 8081:8081
  20. volumes:
  21. - /mydata/app/mall-search/logs:/var/logs
  22. - /etc/localtime:/etc/localtime
  23. environment:
  24. - 'TZ="Asia/Shanghai"'
  25. external_links:
  26. - elasticsearch:es #可以用es这个域名访问elasticsearch服务
  27. - mysql:db #可以用db这个域名访问mysql服务
  28. mall-portal:
  29. image: mall/mall-portal:1.0-SNAPSHOT
  30. container_name: mall-portal
  31. ports:
  32. - 8085:8085
  33. volumes:
  34. - /mydata/app/mall-portal/logs:/var/logs
  35. - /etc/localtime:/etc/localtime
  36. environment:
  37. - 'TZ="Asia/Shanghai"'
  38. external_links:
  39. - redis:redis #可以用redis这个域名访问redis服务
  40. - mongo:mongo #可以用mongo这个域名访问mongo服务
  41. - mysql:db #可以用db这个域名访问mysql服务
  42. - rabbitmq:rabbit #可以用rabbit这个域名访问rabbitmq服务