docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. version: '3'
  2. services:
  3. redis:
  4. image: redis:5.0.8
  5. container_name: iotkit-ce-redis
  6. ports:
  7. - 6379:6379
  8. volumes:
  9. - "redis-volume:/data"
  10. command: redis-server --appendonly yes
  11. environment:
  12. - TZ=Asia/Shanghai
  13. elasticsearch:
  14. image: elasticsearch:7.12.0
  15. container_name: iotkit-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. ports:
  22. - 9200:9200
  23. - 9300:9300
  24. volumes:
  25. - "elasticsearch-volume:/usr/share/elasticsearch/data"
  26. ui:
  27. image: uncleregan/iotkit-ui:0.3.4
  28. container_name: iotkit-ce-ui
  29. ports:
  30. - 80:80
  31. links:
  32. - iotkit:iotkit
  33. volumes:
  34. - "iotkit-volume:/usr/share/nginx/html/upload"
  35. iotkit:
  36. image: uncleregan/iotkit:0.3.4
  37. container_name: iotkit-ce
  38. restart: on-failure
  39. ports:
  40. - 8086:8086 # API端口
  41. - 1883-1890:1883-1890 # 预留
  42. - 8000-8010:8000-8010 # 预留
  43. links:
  44. - redis:redis
  45. - elasticsearch:elasticsearch
  46. depends_on:
  47. - elasticsearch
  48. - redis
  49. volumes:
  50. redis-volume:
  51. elasticsearch-volume:
  52. iotkit-volume: