docker-compose一键部署fastdfs6.0.9
通过docker部署fastdfs
版本号:6.0.9
目录规划如下:
应用目录: /usr/local/fdfs/docker-compose/
数据目录: /data/fdfs/
docker-compose.yaml 示例文件如下
version: '3'
services:
tracker:
image: ygqygq2/fastdfs-nginx:latest
container_name: tracker
restart: always
volumes:
- "/data/fdfs/tracker:/var/fdfs"
network_mode: host
command: "tracker"
storage:
image: ygqygq2/fastdfs-nginx:latest
container_name: storage0
restart: always
volumes:
- "/data/fdfs/storage0:/var/fdfs"
network_mode: host
environment:
TRACKER_SERVER: "tracker:22122"
command: "storage"
extra_hosts:
- "tracker:172.30.55.21"
启动服务
docker-compose -f docker-compose.yaml up -d