From 9b2de96d427b1158e5b5773f3ce52e7a04bb6e6f Mon Sep 17 00:00:00 2001 From: "flow.gunso" Date: Thu, 14 Mar 2019 18:51:47 +0100 Subject: [PATCH] Commit existing code --- Dockerfile | 22 ++++++++++++++++++++++ LICENSE.txt | 21 +++++++++++++++++++++ assets/seafile.list | 1 + assets/supervisord.conf | 5 +++++ docker-compose.yml | 12 ++++++++++++ entrypoint.sh | 7 +++++++ 6 files changed, 68 insertions(+) create mode 100644 Dockerfile create mode 100644 LICENSE.txt create mode 100644 assets/seafile.list create mode 100644 assets/supervisord.conf create mode 100644 docker-compose.yml create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..84ad4e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM debian:jessie + +#ENV UID=1000 +#ENV GID=1000 +#RUN groupadd -g $GID -o seadrive +#RUN useradd -m -u $UID -g $GID -o -s /bin/bash seadrive + +ENV DEBIAN_FRONTEND noninteractive + +COPY assets/seafile.list /etc/apt/sources.list.d/ +COPY assets/supervisord.conf /etc/supervisor/ +COPY entrypoint.sh / + +RUN apt-key adv \ + --keyserver hkp://keyserver.ubuntu.com:80 \ + --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 +RUN apt-get update ;\ + apt-get install -o Dpkg::Options::="--force-confold" -y seafile-cli supervisor + +RUN mkdir /seafile; mkdir /volume + +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..61da8cd --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 flowgunso@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/seafile.list b/assets/seafile.list new file mode 100644 index 0000000..11f6d09 --- /dev/null +++ b/assets/seafile.list @@ -0,0 +1 @@ +deb http://deb.seadrive.org jessie main \ No newline at end of file diff --git a/assets/supervisord.conf b/assets/supervisord.conf new file mode 100644 index 0000000..8a47225 --- /dev/null +++ b/assets/supervisord.conf @@ -0,0 +1,5 @@ +[supervisord] +nodaemon=true + +[unix_http_socket] +file=/seafile/seafile-data/seafile.sock \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e73d1ce --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.4" + +services: + seafile-sync: + image: seafvol:latest + environment: + - SERVER= + - USERNAME= + - PASSWORD= + - LIBRARY_ID= +# - UID= +# - GID= \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..71c6386 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +/usr/bin/seaf-cli init -c /ccnet -d /seafile +/usr/bin/seaf-cli start -c /ccnet +/usr/bin/seaf-cli sync -c /ccnet -u $USERNAME -p $PASSWORD -s $SERVER -l $LIBRARY_ID -d /volume +sleep 10 +/usr/bin/supervisord \ No newline at end of file