local-sync-mount-compose.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. version: '3.9'
  2. services:
  3. node1:
  4. image: chrislusf/seaweedfs:local
  5. command: "server -master -volume -filer"
  6. ports:
  7. - 8888:8888
  8. - 18888:18888
  9. healthcheck:
  10. test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
  11. interval: 1s
  12. start_period: 10s
  13. timeout: 30s
  14. mount1:
  15. image: chrislusf/seaweedfs:local
  16. privileged: true
  17. command: "mount -filer=node1:8888 -dir=/mnt -dirAutoCreate"
  18. healthcheck:
  19. test: [ "CMD", "curl", "--fail", "-I", "http://node1:8888/" ]
  20. interval: 1s
  21. start_period: 10s
  22. timeout: 30s
  23. depends_on:
  24. node1:
  25. condition: service_healthy
  26. node2:
  27. image: chrislusf/seaweedfs:local
  28. ports:
  29. - 7888:8888
  30. - 17888:18888
  31. command: "server -master -volume -filer"
  32. healthcheck:
  33. test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
  34. interval: 1s
  35. start_period: 10s
  36. timeout: 30s
  37. mount2:
  38. image: chrislusf/seaweedfs:local
  39. privileged: true
  40. command: "mount -filer=node2:8888 -dir=/mnt -dirAutoCreate"
  41. healthcheck:
  42. test: [ "CMD", "curl", "--fail", "-I", "http://node2:8888/" ]
  43. interval: 1s
  44. start_period: 10s
  45. timeout: 30s
  46. depends_on:
  47. node2:
  48. condition: service_healthy
  49. sync:
  50. image: chrislusf/seaweedfs:local
  51. command: "-v=4 filer.sync -a=node1:8888 -b=node2:8888 -a.debug -b.debug"
  52. depends_on:
  53. mount1:
  54. condition: service_healthy
  55. mount2:
  56. condition: service_healthy