mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
optimize entrypoint for docker
This commit is contained in:
parent
c16dc57a58
commit
3775211962
|
@ -3,44 +3,27 @@
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
||||||
'master')
|
'master')
|
||||||
ARGS="-mdir /data"
|
ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024"
|
||||||
# Is this instance linked with an other master? (Docker commandline "--link master1:master")
|
|
||||||
if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then
|
|
||||||
ARGS="$ARGS -peers=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT"
|
|
||||||
fi
|
|
||||||
exec /usr/bin/weed $@ $ARGS
|
exec /usr/bin/weed $@ $ARGS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'volume')
|
'volume')
|
||||||
ARGS="-ip `hostname -i` -dir /data"
|
ARGS="-dir=/data -max=0"
|
||||||
# Is this instance linked with a master? (Docker commandline "--link master1:master")
|
|
||||||
if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then
|
|
||||||
ARGS="$ARGS -mserver=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT"
|
|
||||||
fi
|
|
||||||
exec /usr/bin/weed $@ $ARGS
|
exec /usr/bin/weed $@ $ARGS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'server')
|
'server')
|
||||||
ARGS="-ip `hostname -i` -dir /data"
|
ARGS="-ip=`hostname -i` -dir=/data -volume.max=0 -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
||||||
if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then
|
|
||||||
ARGS="$ARGS -master.peers=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT"
|
|
||||||
fi
|
|
||||||
exec /usr/bin/weed $@ $ARGS
|
exec /usr/bin/weed $@ $ARGS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'filer')
|
'filer')
|
||||||
ARGS=""
|
ARGS=""
|
||||||
if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then
|
|
||||||
ARGS="$ARGS -master=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT"
|
|
||||||
fi
|
|
||||||
exec /usr/bin/weed $@ $ARGS
|
exec /usr/bin/weed $@ $ARGS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
's3')
|
's3')
|
||||||
ARGS="-domainName=$S3_DOMAIN_NAME -key.file=$S3_KEY_FILE -cert.file=$S3_CERT_FILE"
|
ARGS="-domainName=$S3_DOMAIN_NAME -key.file=$S3_KEY_FILE -cert.file=$S3_CERT_FILE"
|
||||||
if [ -n "$FILER_PORT_8888_TCP_ADDR" ] ; then
|
|
||||||
ARGS="$ARGS -filer=$FILER_PORT_8888_TCP_ADDR:$FILER_PORT_8888_TCP_PORT"
|
|
||||||
fi
|
|
||||||
exec /usr/bin/weed $@ $ARGS
|
exec /usr/bin/weed $@ $ARGS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
- 18080:18080
|
- 18080:18080
|
||||||
command: '-v=2 volume -max=5 -mserver="master0:9333,master1:9334,master2:9335" -port=8080 -ip=volume'
|
command: 'volume -mserver="master0:9333,master1:9334,master2:9335" -port=8080 -ip=volume'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master0
|
- master0
|
||||||
- master1
|
- master1
|
||||||
|
@ -34,7 +34,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- 8888:8888
|
||||||
- 18888:18888
|
- 18888:18888
|
||||||
command: '-v=4 filer -master="master0:9333,master1:9334,master2:9335"'
|
command: 'filer -master="master0:9333,master1:9334,master2:9335"'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master0
|
- master0
|
||||||
- master1
|
- master1
|
||||||
|
@ -44,7 +44,7 @@ services:
|
||||||
image: chrislusf/seaweedfs:local
|
image: chrislusf/seaweedfs:local
|
||||||
ports:
|
ports:
|
||||||
- 8333:8333
|
- 8333:8333
|
||||||
command: '-v=4 s3 -filer="filer:8888"'
|
command: 's3 -filer="filer:8888"'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master0
|
- master0
|
||||||
- master1
|
- master1
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
- 18080:18080
|
- 18080:18080
|
||||||
command: '-v=2 volume -max=5 -mserver="master:9333" -port=8080 -ip=volume'
|
command: "volume -mserver=master:9333 -port=8080 -ip=volume"
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
filer:
|
filer:
|
||||||
|
@ -20,7 +20,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- 8888:8888
|
||||||
- 18888:18888
|
- 18888:18888
|
||||||
command: '-v=4 filer -master="master:9333"'
|
command: 'filer -master="master:9333"'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
- volume
|
- volume
|
||||||
|
@ -28,7 +28,7 @@ services:
|
||||||
image: chrislusf/seaweedfs:local
|
image: chrislusf/seaweedfs:local
|
||||||
ports:
|
ports:
|
||||||
- 8333:8333
|
- 8333:8333
|
||||||
command: '-v=4 s3 -filer="filer:8888"'
|
command: 's3 -filer="filer:8888"'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
- volume
|
- volume
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
- 18080:18080
|
- 18080:18080
|
||||||
command: 'volume -max=15 -mserver="master:9333" -port=8080'
|
command: 'volume -mserver="master:9333" -port=8080'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
filer:
|
filer:
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
- 18080:18080
|
- 18080:18080
|
||||||
command: '-v=2 volume -max=5 -mserver="master:9333" -port=8080 -ip=volume'
|
command: 'volume -mserver="master:9333" -port=8080 -ip=volume'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
filer:
|
filer:
|
||||||
|
@ -20,7 +20,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- 8888:8888
|
||||||
- 18888:18888
|
- 18888:18888
|
||||||
command: '-v=4 filer -master="master:9333"'
|
command: 'filer -master="master:9333"'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
- volume
|
- volume
|
||||||
|
@ -28,7 +28,7 @@ services:
|
||||||
image: chrislusf/seaweedfs:dev # use a remote dev image
|
image: chrislusf/seaweedfs:dev # use a remote dev image
|
||||||
ports:
|
ports:
|
||||||
- 8333:8333
|
- 8333:8333
|
||||||
command: '-v=4 s3 -filer="filer:8888"'
|
command: 's3 -filer="filer:8888"'
|
||||||
depends_on:
|
depends_on:
|
||||||
- master
|
- master
|
||||||
- volume
|
- volume
|
||||||
|
|
Loading…
Reference in a new issue