local-hashicorp-raft-compose.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. version: '2'
  2. services:
  3. master0:
  4. image: chrislusf/seaweedfs:local
  5. ports:
  6. - 9333:9333
  7. - 19333:19333
  8. command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master0 -port=9333 -peers=master1:9334,master2:9335 -mdir=/data"
  9. volumes:
  10. - ./master/0:/data
  11. environment:
  12. WEED_MASTER_VOLUME_GROWTH_COPY_1: 1
  13. WEED_MASTER_VOLUME_GROWTH_COPY_2: 2
  14. WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
  15. master1:
  16. image: chrislusf/seaweedfs:local
  17. ports:
  18. - 9334:9334
  19. - 19334:19334
  20. command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master1 -port=9334 -peers=master0:9333,master2:9335 -mdir=/data"
  21. volumes:
  22. - ./master/1:/data
  23. environment:
  24. WEED_MASTER_VOLUME_GROWTH_COPY_1: 1
  25. WEED_MASTER_VOLUME_GROWTH_COPY_2: 2
  26. WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
  27. master2:
  28. image: chrislusf/seaweedfs:local
  29. ports:
  30. - 9335:9335
  31. - 19335:19335
  32. command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master2 -port=9335 -peers=master0:9333,master1:9334 -mdir=/data"
  33. volumes:
  34. - ./master/2:/data
  35. environment:
  36. WEED_MASTER_VOLUME_GROWTH_COPY_1: 1
  37. WEED_MASTER_VOLUME_GROWTH_COPY_2: 2
  38. WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
  39. volume1:
  40. image: chrislusf/seaweedfs:local
  41. ports:
  42. - 8080:8080
  43. - 18080:18080
  44. command: 'volume -dataCenter=dc1 -rack=v1 -mserver="master0:9333,master1:9334,master2:9335" -port=8080 -ip=volume1 -publicUrl=localhost:8080 -preStopSeconds=1'
  45. depends_on:
  46. - master0
  47. - master1
  48. volume2:
  49. image: chrislusf/seaweedfs:local
  50. ports:
  51. - 8082:8082
  52. - 18082:18082
  53. command: 'volume -dataCenter=dc2 -rack=v2 -mserver="master0:9333,master1:9334,master2:9335" -port=8082 -ip=volume2 -publicUrl=localhost:8082 -preStopSeconds=1'
  54. depends_on:
  55. - master0
  56. - master1
  57. volume3:
  58. image: chrislusf/seaweedfs:local
  59. ports:
  60. - 8083:8083
  61. - 18083:18083
  62. command: 'volume -dataCenter=dc3 -rack=v3 -mserver="master0:9333,master1:9334,master2:9335" -port=8083 -ip=volume3 -publicUrl=localhost:8083 -preStopSeconds=1'
  63. depends_on:
  64. - master0
  65. - master1
  66. filer:
  67. image: chrislusf/seaweedfs:local
  68. ports:
  69. - 8888:8888
  70. - 18888:18888
  71. - 8111:8111
  72. command: 'filer -defaultReplicaPlacement=100 -iam -master="master0:9333,master1:9334,master2:9335"'
  73. depends_on:
  74. - master0
  75. - master1
  76. - volume1
  77. - volume2
  78. s3:
  79. image: chrislusf/seaweedfs:local
  80. ports:
  81. - 8333:8333
  82. command: '-v=9 s3 -ip.bind="s3" -filer="filer:8888"'
  83. depends_on:
  84. - master0
  85. - master1
  86. - volume1
  87. - volume2
  88. - filer