I just working with SeaweedFS
for a few days and I want to create multiple master and volume and filer
in docker-compose so I just do that this way:
version: '2'
services:
master_1:
image: chrislusf/seaweedfs
ports:
- 9333:9333
- 19333:19333
command: "master -ip=master_1 -port=9333 -mdir=./1 -peers=master_1:9333,master_2:9334"
master_2:
image: chrislusf/seaweedfs
ports:
- 9334:9334
- 19334:19334
command: "master -ip=master_2 -port=9334 -mdir=./2 -peers=master_1:9333,master_2:9334"
volume_1:
image: chrislusf/seaweedfs
ports:
- 8080:8080
- 18080:18080
command: 'volume -dir=./1 -port=8080 -mserver=master_1:9333,master_2:9334'
depends_on:
- master_1
- master_2
volume_2:
image: chrislusf/seaweedfs
ports:
- 8081:8081
- 18081:18081
command: 'volume -dir=./2 -port=8081 -mserver=master_1:9333,master_2:9334'
depends_on:
- master_1
- master_2
filer:
image: chrislusf/seaweedfs
ports:
- 8888:8888
- 18888:18888
command: 'filer -master="master_1:9333,master_2:9334,master_3:9335"'
tty: true
stdin_open: true
depends_on:
- master_1
- master_2
- volume_1
- volume_2
so in this docker-compose.yml
, I want to create a docker volume so I can mount docker volume to my server disk for backup and safety. How can I found where the SeaweedFS uploaded files store in the docker container?
The files are stored to where it is configured. In the above example, the data is under ./1
and ./2
, and filer is default to ./filerldb2
BTW: The docker-compose file only has 2 masters. The filer is using 3 masters.