docker-compose.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. version: '2'
  2. services:
  3. redis:
  4. image: redis:5.0.4
  5. container_name: jetlinks-ce-redis
  6. # ports:
  7. # - "6379:6379"
  8. volumes:
  9. - "./data/redis:/data"
  10. command: redis-server --appendonly yes --requirepass "JetLinks@redis"
  11. environment:
  12. - TZ=Asia/Shanghai
  13. elasticsearch:
  14. image: elasticsearch:6.8.11
  15. container_name: jetlinks-ce-elasticsearch
  16. environment:
  17. ES_JAVA_OPTS: -Djava.net.preferIPv4Stack=true -Xms1g -Xmx1g
  18. transport.host: 0.0.0.0
  19. discovery.type: single-node
  20. bootstrap.memory_lock: "true"
  21. discovery.zen.minimum_master_nodes: 1
  22. discovery.zen.ping.unicast.hosts: elasticsearch
  23. # volumes:
  24. # - ./data/elasticsearch:/usr/share/elasticsearch/data
  25. # ports:
  26. # - "9200:9200"
  27. # - "9300:9300"
  28. kibana:
  29. image: kibana:6.8.11
  30. container_name: jetlinks-ce-kibana
  31. environment:
  32. ELASTICSEARCH_URL: http://elasticsearch:9200
  33. links:
  34. - elasticsearch:elasticsearch
  35. ports:
  36. - "5601:5601"
  37. depends_on:
  38. - elasticsearch
  39. postgres:
  40. image: postgres:11-alpine
  41. container_name: jetlinks-ce-postgres
  42. volumes:
  43. - "./data/postgres:/var/lib/postgresql/data"
  44. ports:
  45. - "5432:5432"
  46. environment:
  47. POSTGRES_PASSWORD: jetlinks
  48. POSTGRES_DB: jetlinks
  49. TZ: Asia/Shanghai
  50. ui:
  51. image: registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-pro:2.0.0
  52. container_name: jetlinks-ce-ui
  53. ports:
  54. - 9000:80
  55. environment:
  56. - "API_BASE_PATH=http://jetlinks:8848/" #API根路径
  57. volumes:
  58. - "./data/jetlinks-ui:/usr/share/nginx/html/upload"
  59. links:
  60. - jetlinks:jetlinks
  61. jetlinks:
  62. image: registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-standalone:2.0.0-SNAPSHOT
  63. container_name: jetlinks-ce
  64. ports:
  65. - "8848:8848" # API端口
  66. - "1883-1890:1883-1890" # 预留
  67. - "8800-8810:8800-8810" # 预留
  68. - "5060-5061:5060-5061" # 预留
  69. volumes:
  70. - "./data/jetlinks:/application/static/upload" # 持久化上传的文件
  71. - "./data/jetlinks/:/application/data/files"
  72. - "./data/jetlinks/:/application/data/protocols"
  73. - "./entrypoint.sh:/entrypoint.sh"
  74. #entrypoint: /entrypoint.sh -d redis:5601,postgres:5432,elasticsearch:9200 'echo "start jetlinks service here"';
  75. environment:
  76. # - "SLEEP_SECOND=4"
  77. - "JAVA_OPTS=-Duser.language=zh -XX:+UseG1GC"
  78. - "TZ=Asia/Shanghai"
  79. - "hsweb.file.upload.static-location=http://127.0.0.1:8848/upload" #上传的静态文件访问根地址,为ui的地址.
  80. - "spring.r2dbc.url=r2dbc:postgresql://postgres:5432/jetlinks" #数据库连接地址
  81. - "spring.r2dbc.username=postgres"
  82. - "spring.r2dbc.password=jetlinks"
  83. - "spring.elasticsearch.uris=elasticsearch:9200"
  84. # - "spring.elasticsearch.username=admin"
  85. # - "spring.elasticsearch.password=admin"
  86. # - "spring.reactor.debug-agent.enabled=false" #设置为false能提升性能
  87. - "spring.redis.host=redis"
  88. - "spring.redis.port=6379"
  89. - "file.manager.storage-base-path=/application/data/files"
  90. - "spring.redis.password=JetLinks@redis"
  91. - "logging.level.io.r2dbc=warn"
  92. - "logging.level.org.springframework.data=warn"
  93. - "logging.level.org.springframework=warn"
  94. - "logging.level.org.jetlinks=warn"
  95. - "logging.level.org.hswebframework=warn"
  96. - "logging.level.org.springframework.data.r2dbc.connectionfactory=warn"
  97. - "network.resources[0]=0.0.0.0:8800-8810/tcp"
  98. - "network.resources[1]=0.0.0.0:1883-1890"
  99. - "hsweb.cors.enable=true"
  100. - "hsweb.cors.configs[0].path=/**"
  101. - "hsweb.cors.configs[0].allowed-credentials=true"
  102. - "hsweb.cors.configs[0].allowed-headers=*"
  103. - "hsweb.cors.configs[0].allowed-origins=*"
  104. - "hsweb.cors.configs[0].allowed-methods[0]=GET"
  105. - "hsweb.cors.configs[0].allowed-methods[1]=POST"
  106. - "hsweb.cors.configs[0].allowed-methods[2]=PUT"
  107. - "hsweb.cors.configs[0].allowed-methods[3]=PATCH"
  108. - "hsweb.cors.configs[0].allowed-methods[4]=DELETE"
  109. - "hsweb.cors.configs[0].allowed-methods[5]=OPTIONS"
  110. links:
  111. - redis:redis
  112. - postgres:postgres
  113. - elasticsearch:elasticsearch
  114. depends_on:
  115. - postgres
  116. - redis
  117. - elasticsearch