diff --git a/README.md b/README.md index f820202..5e14b0a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ # docker-seafile-client -Run a seafile client inside docker which can sync files from seafile repositories. - -See [docker-compose](docker-compose.example.yml) how to use. +Runs a seafile client in docker with possibility to sync seafile repositories. ## Docker-compose example: ```yaml version: '3' + services: seafile-client: restart: always image: snegov/seafile-client - container_name: seafile-client environment: - LIBRARY_ID= - SERVER_HOST= @@ -18,6 +16,7 @@ services: - PASSWORD= - SEAFILE_UID= - SEAFILE_GID= + hostname: docker-seafile-client volumes: - seafile-data:/seafile-client/seafile-data - :/data @@ -26,12 +25,18 @@ volumes: 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. +`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: - - `LIBRARY_ID=` ID of library to sync; multiple libraries could be separated by colon `:` - - `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=` Seafile account username - - `PASSWORD=` Seafile account password - - `SEAFILE_UID=` Downloaded files will have this uid - - `SEAFILE_GID=` Downloaded files will have this gid + - `LIBRARY_ID=` ID of library to sync; multiple libraries could be separated by colon `:`. + - `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=` Seafile account username. + - `PASSWORD=` Seafile account password. + - `SEAFILE_UID=` Downloaded files will have this uid. + - `SEAFILE_GID=` Downloaded files will have this gid. diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 00d296e..86544f9 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -1,16 +1,17 @@ version: '3' + services: seafile-client: restart: always image: snegov/seafile-client - container_name: seafile-client environment: - - LIBRARY_ID= - - SERVER_HOST= - - USERNAME= - - PASSWORD= - - SEAFILE_UID= - - SEAFILE_GID= + - LIBRARY_ID="79867cbf-2944-488d-9105-859463ecdf9e:8078e3ff-b2a0-450a-b4dd-c1ed9ef18294" + - SERVER_HOST=seafile.example.com + - USERNAME=user + - PASSWORD=password + - SEAFILE_UID=1000 + - SEAFILE_GID=100 + hostname: docker-seafcli volumes: - seafile-data:/seafile-client/seafile-data - /home/johndow/seafile:/data