-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
64 lines (61 loc) · 1.63 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Use for testing Interval rSync
#
# This docker compose file creates server and
# client services, mounting ./data/dest and ./data/source
# respectivly.
#
# source: https://hub.docker.com/r/txn2/irsync/
# irsync docker image: https://hub.docker.com/r/txn2/irsync/
# rsyncd docker image: https://hub.docker.com/r/txn2/rsyncd/ (or use any rsync server)
#
version: '3'
# Setting up an internal network allow us to use the
# default port and not wory about exposing ports on our
# host.
#
networks:
sync-net:
services:
server:
image: "txn2/rsyncd"
container_name: rsyncd-server
environment:
- USERNAME=test
- PASSWORD=password
- VOLUME_PATH=/source_data
- READ_ONLY=true
- CHROOT=yes
- VOLUME_NAME=source_data
- HOSTS_ALLOW=0.0.0.0/0
volumes:
- ./data/source:/source_data
networks:
- sync-net
client:
image: "txn2/irsync"
container_name: irsync-client
environment:
- RSYNC_PASSWORD=password
# irsync and rsync options can be intermixed.
#
# irsync - has two configuration directives:
# --irsync-interval-seconds=SECONDS number of seconds between intervals
# --irsync-timeout-seconds=SECONDS number of seconds allowed for inactivity
#
# rsync has over one hundred options:
# see: https://download.samba.org/pub/rsync/rsync.html
#
command: [
"--irsync-interval-seconds=30",
"-pvrt",
"--delete",
"--modify-window=2",
"rsync://test@rsyncd-server:873/source_data/",
"/data/"
]
volumes:
- ./data/dest:/data
depends_on:
- server
networks:
- sync-net