update
This commit is contained in:
16
rsync/Demo/SingleNode/README.md
Normal file
16
rsync/Demo/SingleNode/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 部署 rsync
|
||||
|
||||
- 分享服务器 /data1 和 /data2 目录
|
||||
- 根据实际环境修改
|
||||
- docker-compose.yml
|
||||
|
||||
- 创建目录
|
||||
```
|
||||
grep '\<source:' docker-compose.yml | cut -d: -f2 | xargs mkdir -p
|
||||
```
|
||||
|
||||
- 启动
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
24
rsync/Demo/SingleNode/docker-compose.yml
Normal file
24
rsync/Demo/SingleNode/docker-compose.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
rsync:
|
||||
image: harbor.colben.cn/general/rsync
|
||||
container_name: rsync
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 1m
|
||||
ports:
|
||||
- 873:873
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./rsync/rsyncd.conf
|
||||
target: /etc/rsyncd.conf
|
||||
- type: bind
|
||||
source: ./rsync/log
|
||||
target: /var/log/rsync
|
||||
- type: bind
|
||||
source: /data1
|
||||
target: /d1
|
||||
- type: bind
|
||||
source: /data2
|
||||
target: /d2
|
||||
|
15
rsync/Demo/SingleNode/rsync/rsyncd.conf
Normal file
15
rsync/Demo/SingleNode/rsync/rsyncd.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
uid = root
|
||||
gid = root
|
||||
use chroot = yes
|
||||
read only = yes
|
||||
|
||||
[data1]
|
||||
path = /d1/
|
||||
uid = nobody
|
||||
gid = nobody
|
||||
read only = no
|
||||
use chroot = no
|
||||
|
||||
[data2]
|
||||
path = /d2/
|
||||
|
Reference in New Issue
Block a user