Browse Source

set master ip in docker compose yaml file

fix https://github.com/chrislusf/seaweedfs/issues/1118
pull/1158/head
Chris Lu 5 years ago
parent
commit
06ff984786
  1. 2
      docker/dev-compose.yml
  2. 2
      docker/entrypoint.sh
  3. 2
      docker/seaweedfs-compose.yml

2
docker/dev-compose.yml

@ -8,7 +8,7 @@ services:
ports: ports:
- 9333:9333 - 9333:9333
- 19333:19333 - 19333:19333
command: "master"
command: "master -ip=master"
volume: volume:
build: build:
context: . context: .

2
docker/entrypoint.sh

@ -3,7 +3,7 @@
case "$1" in case "$1" in
'master') 'master')
ARGS="-ip `hostname -i` -mdir /data"
ARGS="-mdir /data"
# Is this instance linked with an other master? (Docker commandline "--link master1:master") # Is this instance linked with an other master? (Docker commandline "--link master1:master")
if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then
ARGS="$ARGS -peers=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT" ARGS="$ARGS -peers=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT"

2
docker/seaweedfs-compose.yml

@ -6,7 +6,7 @@ services:
ports: ports:
- 9333:9333 - 9333:9333
- 19333:19333 - 19333:19333
command: "master"
command: "master -ip=master"
volume: volume:
image: chrislusf/seaweedfs # use a remote image image: chrislusf/seaweedfs # use a remote image
ports: ports:

Loading…
Cancel
Save