1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-09 04:50:47 +02:00

feat: Send commands to weed shell from the docker image.

Add the ability to send commands to weed shell from the docker image.

Allows an operator to perform maintenance commands like so:
```
docker run \
  --rm \
  -e SHELL_FILER=localhost:8888 \
  -e SHELL_MASTER=localhost:9333 \
  chrislusf/seaweedfs:local \
  "shell" \
  "fs.configure -locationPrefix=/buckets/foo -volumeGrowthCount=3 -replication=002 -apply"
```
This commit is contained in:
Kaiwalya Joshi 2022-06-01 15:47:10 -07:00
parent e152dc8fae
commit 47d335cf8c
No known key found for this signature in database
GPG key ID: 099DF5226286CD44

View file

@ -57,6 +57,12 @@ case "$1" in
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
;;
'shell')
ARGS="-cluster=$SHELL_CLUSTER -filer=$SHELL_FILER -filerGroup=$SHELL_FILER_GROUP -master=$SHELL_MASTER -options=$SHELL_OPTIONS"
shift
exec echo "$@" | /usr/bin/weed -logtostderr=true shell $ARGS
;;
*)
exec /usr/bin/weed $@
;;