Closed pascalandy closed 5 years ago
Also, do we need to copy-paste something (like a config) from the first container into other nodes ?
@pascalandy 1) Synd docker image is restricted to "/mnt/sync/folders", "/mnt/mounted_folders" folders inside container, therefore mounting /mnt/pics won't work. 2) Current implementation of Sync docker image only allows to use WebUI to configure folders, it is not designed to used config as it resides inside /etc/ in container. You can attempt to run bash in container and manually adjust config file, though. We plan to change it in future and move config file to /mnt/sync, therefore it'll be accessible from real PC.
Thanks for the answer!
I wish the docker community could run only two containers to shuffle files around! Here is my two cents:
MNT_myapp=/mnt/syncdata/myapp
mkdir -p $MNT_myapp
cd $MNT_myapp/ && ls -la
CTN_resilio="resilio_myapp"
#
docker rm -f "$CTN_resilio"
sleep 1
#
docker run -d \
--name "$CTN_resilio" \
-v /mnt/syncdata/myapp:/data \
--restart=always \
-p 55555:55555 \
-e RSLSYNC_TOKEN="fancysecret_deb0e8cMmUzMG71baYTRc2a2806eac1e8MGQMzM3ZGQ3N2RlNDlmYmM" \
-e RSLSYNC_ROLE=master \
resilio/sync:2.4.4
#
sleep 4
docker logs -f $CTN_name
# Check the state of resilio in the logs.
# Should be ready to sync with other containers.
CTN_resilio="resilio_myapp"
#
docker rm -f "$CTN_resilio"
sleep 1
#
docker run -d \
--name "$CTN_resilio" \
-v /mnt/syncdata/myapp:/data \
--restart=always \
-p 55555:55555 \
-e RSLSYNC_TOKEN="fancysecret_deb0e8cMmUzMG71baYTRc2a2806eac1e8MGQMzM3ZGQ3N2RlNDlmYmM" \
-e RSLSYNC_ROLE=minion \
resilio/sync:2.4.4
# Check the state of resilio in the logs.
# Should see files that were synced.
What do you think?
Cheers! https://twitter.com/_pascalandy
You can do it with current implementation. Just ensure that the WebUI and listening ports do not intersect on your host.
I would love to but I don't see how. I'll be very happy to put this in place :)
Just run instances with different ports. For example, first instance will be started as:
docker run -d --name Sync1 \
-p 8888:8888 -p 55555:55555 \
-v $DATA_FOLDER:/mnt/sync \
--restart on-failure \
resilio/sync
Second instance as:
docker run -d --name Sync2\
-p 8889:8888 -p 55556:55555 \
-v $DATA_FOLDER:/mnt/sync \
--restart on-failure \
resilio/sync
In your example, how does the server 1 can talk with server 2? No key or anything ?
docker run -d --name Sync1 \
-p 8888:8888 -p 55555:55555 \
-v $DATA_FOLDER:/mnt/sync \
--restart on-failure \
resilio/sync
docker run -d --name Sync2\
-p 8889:8888 -p 55556:55555 \
-v $DATA_FOLDER:/mnt/sync \
--restart on-failure \
resilio/sync
You can share key via webui of both instances.
I tried many many many times. Delays, too many much clicks. Nodes are up and down all the time, so as a docker devops guys, it does work for me :(
I would just love to run this, authorized minions from a token generated by the leader and call it a day.
Got you. You can map one more extra folder, /etc and edit sync.conf file. See here for instructions on config file syntax.
In future, we plan to make it available so no additional mount required.
Sounds promising. Please let me know when it's ready :)
It works fine, thank you for this image! Please keep it up-to-date.
I wan't to share my docker-compose.yml
# simplified example
services:
my_app:
# ...
volumes:
- "./volumes/app_data:/var/app_data"
my_app_resilio:
# ...
image: resilio/sync
volumes:
- "./volumes/resilio:/mnt/sync"
- "./volumes/IgnoreList:/mnt/mounted_folders/app/.sync/IgnoreList:ro"
- "./volumes/app_data:/mnt/mounted_folders/app/app_data:ro"
Hi,
Context
I discovered sync via this project https://github.com/nimmis/docker-btsync. It still works well but nimmis' project is not supported anymore since sync is now Resilio.
So I would prefer to use Resilio from the latest updates :) I'm trying to use the official project within Docker but it's not working yet.
At this point I only want to sync one directory named:
pics
. I will run another set of container if I want to share more directories.Question - I guess I'm missing something right ?
///
This is how I would expect this project to work:
On my Linux Server: mkdir -p /mnt/syncdata/sync mkdir -p /mnt/syncdata/pics
On my mac: mkdir -p /Users/andy/Documents/mnt/syncdata/pics mkdir -p /Users/andy/Documents/mnt/syncdata/sync
1) Start the first Resilio (master) container
2) Find the
-e RSLSYNC_SECRET
Question - I can't find the secret ID at the moment. So I don't understand how Minion nodes can communicate with the master.
_... then copy paste: -e RSLSYNCSECRET=ATLVGBCC4XUL4E7S3ZZ6UNS5Z2SZN2J7Y
3) Start minion containers
or ...
and so on ...
P.S. I don't mind using the GUI at this point.
Cheers! twitter.com/_pascalandy