-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
27 lines (26 loc) · 1.07 KB
/
Copy pathcompose.yaml
File metadata and controls
27 lines (26 loc) · 1.07 KB
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
# One way to run the replicator, not a requirement. Anything that
# provides rclone + python3, a read-only mount of the source data directory, and a
# port the source SFTPGo can reach will do.
#
# Add this service alongside your source SFTPGo instance. The rclone remote named
# "backup" is defined purely by RCLONE_CONFIG_BACKUP_* variables, so there is no
# rclone config file to manage.
services:
replicator:
image: rclone/rclone:latest
restart: unless-stopped
user: "0:0"
env_file:
- .env
volumes:
# The source instance's data directory, read-only: the replicator only reads.
- /srv/uploads:/data/source:ro
- ./replicator.sh:/replicator.sh:ro
- ./replicator.py:/replicator.py:ro
# Pin the backup's host key; without this rclone does no host-key validation.
# Generate with: ssh-keyscan -p <port> <host> > backup_known_hosts
- ./backup_known_hosts:/known_hosts:ro
# The source SFTPGo posts upload/rename events here. Loopback only.
ports:
- "127.0.0.1:8787:8787"
entrypoint: ["/bin/sh", "/replicator.sh"]