mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge pull request #729 from hans-strudle/master
Add filer to docker-compose and entrypoint and build from local Dockerfile
This commit is contained in:
commit
98d9aadd37
|
@ -8,10 +8,12 @@ RUN apk add --no-cache --virtual build-dependencies --update wget curl ca-certif
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
EXPOSE 8888
|
||||||
EXPOSE 9333
|
EXPOSE 9333
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
COPY filer.toml /etc/seaweedfs/filer.toml
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
image: chrislusf/seaweedfs
|
#image: chrislusf/seaweedfs # use a remote image
|
||||||
|
build: . # build our container from the local Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 9333:9333
|
- 9333:9333
|
||||||
command: "master"
|
command: "master"
|
||||||
|
@ -11,7 +12,8 @@ services:
|
||||||
aliases:
|
aliases:
|
||||||
- seaweed_master
|
- seaweed_master
|
||||||
volume:
|
volume:
|
||||||
image: chrislusf/seaweedfs
|
#image: chrislusf/seaweedfs # use a remote image
|
||||||
|
build: . # build our container from the local Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
command: 'volume -max=5 -mserver="master:9333" -port=8080'
|
command: 'volume -max=5 -mserver="master:9333" -port=8080'
|
||||||
|
@ -20,4 +22,17 @@ services:
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
aliases:
|
aliases:
|
||||||
- seaweed_volume
|
- seaweed_volume
|
||||||
|
filer:
|
||||||
|
#image: chrislusf/seaweedfs # use a remote image
|
||||||
|
build: . # build our container from the local Dockerfile
|
||||||
|
ports:
|
||||||
|
- 8888:8888
|
||||||
|
command: 'filer -master="master:9333"'
|
||||||
|
depends_on:
|
||||||
|
- master
|
||||||
|
- volume
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
aliases:
|
||||||
|
- seaweed_filer
|
||||||
|
|
|
@ -28,6 +28,14 @@ case "$1" in
|
||||||
exec /usr/bin/weed $@ $ARGS
|
exec /usr/bin/weed $@ $ARGS
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
'filer')
|
||||||
|
ARGS="-ip `hostname -i`"
|
||||||
|
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 $@
|
exec /usr/bin/weed $@
|
||||||
;;
|
;;
|
||||||
|
|
3
docker/filer.toml
Normal file
3
docker/filer.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[leveldb]
|
||||||
|
enabled = true
|
||||||
|
dir = "."
|
Loading…
Reference in a new issue