diff --git a/rslsync/Dockerfile b/rslsync/Dockerfile index 3c7c2e6..b4e0e01 100644 --- a/rslsync/Dockerfile +++ b/rslsync/Dockerfile @@ -12,11 +12,11 @@ RUN set -xe \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* -ENV CONFIG_FILE /etc/rslsync.conf -ENV STORAGE_PATH /data/.syncsystem -ENV DIRECTORY_ROOT /data/syncaod +ENV CONFIG_FILE /etc/rslsync.json +ENV STORAGE_PATH /data/system +ENV DIRECTORY_ROOT /data/user -COPY rslsync.conf $CONFIG_FILE +COPY rslsync.json $CONFIG_FILE VOLUME /data EXPOSE 8888 55555 diff --git a/rslsync/README.md b/rslsync/README.md index bd9540f..4d9aa23 100644 --- a/rslsync/README.md +++ b/rslsync/README.md @@ -13,33 +13,38 @@ rslsync: - "55555:55555" volumes: - ./data:/data - - ./rslsync.conf:/etc/rslsync.conf + - ./rslsync.json:/etc/rslsync.json restart: always ``` -## rslsync.conf +## rslsync.json ```json { - "device_name": "My Sync Device", + "device_name": "Resilio Sync Server", "listening_port": 55555, - "storage_path": "/data/.syncsystem", + "storage_path": "/data/system", "pid_file": "/var/run/rslsync.pid", "use_upnp": false, "download_limit": 0, "upload_limit": 0, - "directory_root": "/data/syncaod", + "directory_root": "/data/user", "directory_root_policy": "all", "webui": { - "listen": "0.0.0.0:8888" + "listen": "0.0.0.0:8888", + "login": "admin", + "password": "admin" } } ``` +> Please change the default login/password. + ## up and running ```bash -$ docker-compose run --rm rslsync --dump-sample-config > rslsync.conf +$ docker-compose run --rm rslsync rslsync --dump-sample-config > rslsync.json +$ vi rslsync.json $ docker-compose up -d ``` diff --git a/rslsync/rslsync.conf b/rslsync/rslsync.conf deleted file mode 100644 index 717c147..0000000 --- a/rslsync/rslsync.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "device_name": "My Sync Device", - "listening_port": 55555, - "storage_path": "/data/.syncsystem", - "pid_file": "/var/run/rslsync.pid", - "use_upnp": false, - "download_limit": 0, - "upload_limit": 0, - "directory_root": "/data/syncaod", - "directory_root_policy": "all", - "webui": { - "listen": "0.0.0.0:8888" - } -} diff --git a/rslsync/rslsync.json b/rslsync/rslsync.json new file mode 100644 index 0000000..2dae1eb --- /dev/null +++ b/rslsync/rslsync.json @@ -0,0 +1,16 @@ +{ + "device_name": "Resilio Sync Server", + "listening_port": 55555, + "storage_path": "/data/system", + "pid_file": "/var/run/rslsync.pid", + "use_upnp": false, + "download_limit": 0, + "upload_limit": 0, + "directory_root": "/data/user", + "directory_root_policy": "all", + "webui": { + "listen": "0.0.0.0:8888", + "login": "admin", + "password": "admin" + } +} diff --git a/rslsync/rslsync.service b/rslsync/rslsync.service deleted file mode 100644 index 0f371f4..0000000 --- a/rslsync/rslsync.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Resilio Sync Daemon -After=network.target -AssertPathExists=/etc/rslsync.conf -AssertPathIsDirectory=/data/.syncsystem -AssertPathIsDirectory=/data/syncaod - -[Service] -ExecStart=/usr/bin/rslsync --nodaemon --config /etc/rslsync.conf -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target