mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-21 01:27:01 +02:00
update rslsync
This commit is contained in:
parent
9d5d075e74
commit
51bc16f6e2
@ -7,19 +7,19 @@ MAINTAINER kev <noreply@easypi.info>
|
||||
|
||||
RUN set -xe \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y curl \
|
||||
&& apt-get install -y ca-certificates curl zip \
|
||||
&& curl -sSL https://download-cdn.getsync.com/stable/linux-x64/resilio-sync_x64.tar.gz | tar xz -C /usr/bin/ rslsync \
|
||||
&& apt-get purge -y --auto-remove curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY config.json /etc/rslsync/
|
||||
|
||||
ENV CONFIG_FILE /etc/rslsync.conf
|
||||
ENV STORAGE_PATH /data/.syncsystem
|
||||
ENV DIRECTORY_ROOT /data/syncaod
|
||||
|
||||
VOLUME /etc/rslsync /data
|
||||
COPY rslsync.conf $CONFIG_FILE
|
||||
VOLUME /data
|
||||
EXPOSE 8888 55555
|
||||
|
||||
CMD set -xe \
|
||||
&& mkdir -p "$STORAGE_PATH" "$DIRECTORY_ROOT" \
|
||||
&& rslsync --nodaemon --config /etc/rslsync/config.json
|
||||
&& rslsync --nodaemon --config "$CONFIG_FILE"
|
||||
|
@ -3,5 +3,44 @@ rslsync
|
||||
|
||||
[Resilio Sync][1] is a fast, simple, and secure file syncing for IT and individuals.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
rslsync:
|
||||
image: vimagick/rslsync
|
||||
ports:
|
||||
- "8888:8888"
|
||||
- "55555:55555"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./rslsync.conf:/etc/rslsync.conf
|
||||
restart: always
|
||||
```
|
||||
|
||||
## rslsync.conf
|
||||
|
||||
```json
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ docker-compose run --rm rslsync --dump-sample-config > rslsync.conf
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
[1]: https://getsync.com/
|
||||
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"device_name": "Resilio Sync Server",
|
||||
"listening_port": 55555,
|
||||
"storage_path": "/data/.syncsystem",
|
||||
"pid_file": "/data/.syncsystem/btsync.pid",
|
||||
"use_upnp": false,
|
||||
"download_limit": 0,
|
||||
"upload_limit": 0,
|
||||
"webui": {
|
||||
"listen": "0.0.0.0:8888",
|
||||
"directory_root": "/data/syncaod"
|
||||
}
|
||||
}
|
@ -5,4 +5,5 @@ rslsync:
|
||||
- "55555:55555"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./rslsync.conf:/etc/rslsync.conf
|
||||
restart: always
|
||||
|
14
rslsync/rslsync.conf
Normal file
14
rslsync/rslsync.conf
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
[Unit]
|
||||
Description=Resilio Sync Daemon
|
||||
After=network.target
|
||||
AssertPathExists=/etc/btsync/config.json
|
||||
AssertPathExists=/etc/rslsync.conf
|
||||
AssertPathIsDirectory=/data/.syncsystem
|
||||
AssertPathIsDirectory=/data/syncaod
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/btsync --nodaemon --config /etc/btsync/config.json
|
||||
ExecStart=/usr/bin/rslsync --nodaemon --config /etc/rslsync.conf
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user