Update README

This commit is contained in:
Maks Snegov 2021-02-28 23:27:51 +03:00
parent 310eb9028c
commit 681b11bbc1
2 changed files with 23 additions and 17 deletions

View File

@ -1,16 +1,14 @@
# docker-seafile-client # docker-seafile-client
Run a seafile client inside docker which can sync files from seafile repositories. Runs a seafile client in docker with possibility to sync seafile repositories.
See [docker-compose](docker-compose.example.yml) how to use.
## Docker-compose example: ## Docker-compose example:
```yaml ```yaml
version: '3' version: '3'
services: services:
seafile-client: seafile-client:
restart: always restart: always
image: snegov/seafile-client image: snegov/seafile-client
container_name: seafile-client
environment: environment:
- LIBRARY_ID=<your-library-id-here> - LIBRARY_ID=<your-library-id-here>
- SERVER_HOST=<server-host> - SERVER_HOST=<server-host>
@ -18,6 +16,7 @@ services:
- PASSWORD=<password> - PASSWORD=<password>
- SEAFILE_UID=<your_uid> - SEAFILE_UID=<your_uid>
- SEAFILE_GID=<your_gid> - SEAFILE_GID=<your_gid>
hostname: docker-seafile-client
volumes: volumes:
- seafile-data:/seafile-client/seafile-data - seafile-data:/seafile-client/seafile-data
- <host-volume-path>:/data - <host-volume-path>:/data
@ -26,12 +25,18 @@ volumes:
seafile-data: seafile-data:
``` ```
Library id could be found from "My Libraries" page in Seafile webUI - link to each library contains library ID in it.
Inside container libraries' content will be put in `/data` directory, so map your host directory to it. Inside container libraries' content will be put in `/data` directory, so map your host directory to it.
`hostname` parameter in docker-compose will set client name in Seafile's "Linked devices" admin page. Resulting name will be prefixed by "terminal-".
Also you could check [docker-compose example](docker-compose.example.yml).
## Environment variables: ## Environment variables:
- `LIBRARY_ID=<your-library-id-here>` ID of library to sync; multiple libraries could be separated by colon `:` - `LIBRARY_ID=<your-library-id-here>` ID of library to sync; multiple libraries could be separated by colon `:`.
- `SERVER_HOST=<server-host>` Hostname of your seafile server, eg: seafile.example.com. If you're using non-standart port, specify it here, eg: seafile.example.com:8080 - `SERVER_HOST=<server-host>` Hostname of your seafile server, eg: `seafile.example.com`. If you're using non-standart port, specify it here, eg: `seafile.example.com:8080`.
- `USERNAME=<username>` Seafile account username - `USERNAME=<username>` Seafile account username.
- `PASSWORD=<password>` Seafile account password - `PASSWORD=<password>` Seafile account password.
- `SEAFILE_UID=<uid>` Downloaded files will have this uid - `SEAFILE_UID=<uid>` Downloaded files will have this uid.
- `SEAFILE_GID=<gid>` Downloaded files will have this gid - `SEAFILE_GID=<gid>` Downloaded files will have this gid.

View File

@ -1,16 +1,17 @@
version: '3' version: '3'
services: services:
seafile-client: seafile-client:
restart: always restart: always
image: snegov/seafile-client image: snegov/seafile-client
container_name: seafile-client
environment: environment:
- LIBRARY_ID=<your-library-id-here> - LIBRARY_ID="79867cbf-2944-488d-9105-859463ecdf9e:8078e3ff-b2a0-450a-b4dd-c1ed9ef18294"
- SERVER_HOST=<server-host> - SERVER_HOST=seafile.example.com
- USERNAME=<username> - USERNAME=user
- PASSWORD=<password> - PASSWORD=password
- SEAFILE_UID=<your_uid> - SEAFILE_UID=1000
- SEAFILE_GID=<your_gid> - SEAFILE_GID=100
hostname: docker-seafcli
volumes: volumes:
- seafile-data:/seafile-client/seafile-data - seafile-data:/seafile-client/seafile-data
- /home/johndow/seafile:/data - /home/johndow/seafile:/data