1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00

update rslsync

This commit is contained in:
kev 2016-09-20 19:14:12 +08:00
parent 51bc16f6e2
commit a2566fc9a7
5 changed files with 32 additions and 39 deletions

View File

@ -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

View File

@ -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
```

View File

@ -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"
}
}

16
rslsync/rslsync.json Normal file
View File

@ -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"
}
}

View File

@ -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