1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-20 13:58:42 +00: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

@ -12,11 +12,11 @@ RUN set -xe \
&& apt-get purge -y --auto-remove curl \ && apt-get purge -y --auto-remove curl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ENV CONFIG_FILE /etc/rslsync.conf ENV CONFIG_FILE /etc/rslsync.json
ENV STORAGE_PATH /data/.syncsystem ENV STORAGE_PATH /data/system
ENV DIRECTORY_ROOT /data/syncaod ENV DIRECTORY_ROOT /data/user
COPY rslsync.conf $CONFIG_FILE COPY rslsync.json $CONFIG_FILE
VOLUME /data VOLUME /data
EXPOSE 8888 55555 EXPOSE 8888 55555

@ -13,33 +13,38 @@ rslsync:
- "55555:55555" - "55555:55555"
volumes: volumes:
- ./data:/data - ./data:/data
- ./rslsync.conf:/etc/rslsync.conf - ./rslsync.json:/etc/rslsync.json
restart: always restart: always
``` ```
## rslsync.conf ## rslsync.json
```json ```json
{ {
"device_name": "My Sync Device", "device_name": "Resilio Sync Server",
"listening_port": 55555, "listening_port": 55555,
"storage_path": "/data/.syncsystem", "storage_path": "/data/system",
"pid_file": "/var/run/rslsync.pid", "pid_file": "/var/run/rslsync.pid",
"use_upnp": false, "use_upnp": false,
"download_limit": 0, "download_limit": 0,
"upload_limit": 0, "upload_limit": 0,
"directory_root": "/data/syncaod", "directory_root": "/data/user",
"directory_root_policy": "all", "directory_root_policy": "all",
"webui": { "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 ## up and running
```bash ```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 $ docker-compose up -d
``` ```

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

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

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