local-k8s-compose.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. version: '2'
  2. services:
  3. master:
  4. image: chrislusf/seaweedfs:local
  5. ports:
  6. - 9333:9333
  7. - 19333:19333
  8. command: "master -ip=master"
  9. volume:
  10. image: chrislusf/seaweedfs:local
  11. ports:
  12. - 8080:8080
  13. - 18080:18080
  14. command: "volume -mserver=master:9333 -port=8080 -ip=volume"
  15. depends_on:
  16. - master
  17. mysql:
  18. image: percona/percona-server:5.7
  19. ports:
  20. - 3306:3306
  21. volumes:
  22. - ./seaweedfs.sql:/docker-entrypoint-initdb.d/seaweedfs.sql
  23. environment:
  24. - MYSQL_ROOT_PASSWORD=secret
  25. - MYSQL_DATABASE=seaweedfs
  26. - MYSQL_PASSWORD=secret
  27. - MYSQL_USER=seaweedfs
  28. filer:
  29. image: chrislusf/seaweedfs:local
  30. ports:
  31. - 8888:8888
  32. - 18888:18888
  33. environment:
  34. - WEED_MYSQL_HOSTNAME=mysql
  35. - WEED_MYSQL_PORT=3306
  36. - WEED_MYSQL_DATABASE=seaweedfs
  37. - WEED_MYSQL_USERNAME=seaweedfs
  38. - WEED_MYSQL_PASSWORD=secret
  39. - WEED_MYSQL_ENABLED=true
  40. - WEED_MYSQL_CONNECTION_MAX_IDLE=5
  41. - WEED_MYSQL_CONNECTION_MAX_OPEN=75
  42. # "refresh" connection every 10 minutes, eliminating mysql closing "old" connections
  43. - WEED_MYSQL_CONNECTION_MAX_LIFETIME_SECONDS=600
  44. # enable usage of memsql as filer backend
  45. - WEED_MYSQL_INTERPOLATEPARAMS=true
  46. - WEED_LEVELDB2_ENABLED=false
  47. command: '-v 9 filer -master="master:9333"'
  48. depends_on:
  49. - master
  50. - volume
  51. - mysql
  52. ingress:
  53. image: jwilder/nginx-proxy:alpine
  54. ports:
  55. - "80:80"
  56. volumes:
  57. - /var/run/docker.sock:/tmp/docker.sock:ro
  58. - ./nginx/proxy.conf:/etc/nginx/proxy.conf
  59. s3:
  60. image: chrislusf/seaweedfs:local
  61. ports:
  62. - 8333:8333
  63. command: '-v 9 s3 -filer="filer:8888"'
  64. depends_on:
  65. - master
  66. - volume
  67. - filer
  68. environment:
  69. - VIRTUAL_HOST=ingress
  70. - VIRTUAL_PORT=8333
  71. registry:
  72. image: registry:2
  73. environment:
  74. REGISTRY_HTTP_ADDR: "0.0.0.0:5001" # seaweedfs s3
  75. REGISTRY_LOG_LEVEL: "debug"
  76. REGISTRY_STORAGE: "s3"
  77. REGISTRY_STORAGE_S3_REGION: "us-east-1"
  78. REGISTRY_STORAGE_S3_REGIONENDPOINT: "http://ingress"
  79. REGISTRY_STORAGE_S3_BUCKET: "registry"
  80. REGISTRY_STORAGE_S3_ACCESSKEY: "some_access_key1"
  81. REGISTRY_STORAGE_S3_SECRETKEY: "some_secret_key1"
  82. REGISTRY_STORAGE_S3_V4AUTH: "true"
  83. REGISTRY_STORAGE_S3_SECURE: "false"
  84. REGISTRY_STORAGE_S3_SKIPVERIFY: "true"
  85. REGISTRY_STORAGE_S3_ROOTDIRECTORY: "/"
  86. REGISTRY_STORAGE_DELETE_ENABLED: "true"
  87. REGISTRY_STORAGE_REDIRECT_DISABLE: "true"
  88. REGISTRY_VALIDATION_DISABLED: "true"
  89. ports:
  90. - 5001:5001
  91. depends_on:
  92. - s3
  93. - ingress