Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
9561a29e9d | |||
21023671f5 | |||
c1cb3885d7 | |||
7d1d8453ce | |||
0a7448aec4 | |||
4dfc15fffd | |||
65140c1986 | |||
3c42cff98d | |||
33af52ff54 | |||
5b07f77f53 | |||
6fabfb2aab | |||
19014932d1 | |||
99748c70aa | |||
e9e595ef68 | |||
d05de406f8 | |||
![]() |
1b4ad91a13 |
@ -6,12 +6,12 @@ pipeline:
|
|||||||
- nginx -t
|
- nginx -t
|
||||||
docker:
|
docker:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
repo: repo.shimun.net/shimun/seafile
|
repo: repo.shimun.net/shimun/seafile:git
|
||||||
tag: riffol
|
tag: riffol
|
||||||
registry: repo.shimun.net
|
registry: repo.shimun.net
|
||||||
storage_path: /drone/.docker
|
storage_path: /drone/.docker
|
||||||
secrets: ["docker_username", "docker_password"]
|
secrets: ["docker_username", "docker_password"]
|
||||||
storage_path: /drone/.docker
|
storage_path: /drone/cache/.docker
|
||||||
cache_from: ["repo.shimun.net/shimun/seafile", "repo.shimun.net/shimun/seafile:nginx-deb", "repo.shimun.net/shimun/seafile:alpine"]
|
cache_from: ["repo.shimun.net/shimun/seafile:git"]
|
||||||
use_cache: true
|
use_cache: true
|
||||||
pull_image: false
|
pull_image: false
|
||||||
|
29
Dockerfile
29
Dockerfile
@ -1,6 +1,6 @@
|
|||||||
FROM rust:1.34 AS riffol_build
|
FROM rust:1.36-slim AS riffol_build
|
||||||
|
|
||||||
RUN cargo install --git https://github.com/shimunn/riffol.git --branch print_error
|
RUN cargo install --git https://github.com/shimunn/riffol.git --branch print_error --locked
|
||||||
|
|
||||||
FROM nginx:mainline
|
FROM nginx:mainline
|
||||||
|
|
||||||
@ -12,16 +12,21 @@ ENV SEAF=/opt/seafile
|
|||||||
|
|
||||||
COPY requirements.txt /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
|
|
||||||
RUN apt update && apt install locales -y && apt install -y --no-install-recommends procps openssl python2.7 sqlite3 python-mysqldb python-pil curl libjansson4 libfuse2 python-pip python-pip-whl python-setuptools \
|
RUN apt update && apt install locales -y && apt install -y procps libmariadb-dev-compat openssl python2.7 sqlite3 python-mysqldb python-pil curl libjansson4 libfuse2 python-pip python-pip-whl python-setuptools python3 sqlite3 python3 python3-pip python3-setuptools python3-ldap \
|
||||||
&& pip install -r /tmp/requirements.txt && apt remove -y python-pip \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/requirements.txt
|
&& rm -rf /var/lib/apt/lists/* /tmp/requirements.txt
|
||||||
|
|
||||||
#ENV RIFFOL_VERSION libc-2.24
|
RUN python3 -m pip install --upgrade pip && rm -r /root/.cache/pip
|
||||||
#ENV RIFFOL_HASH e6aea0a91abe74dc0892b0814a0485f16ce8b738b4672b4980b15a398c013e974d5d1b6c27eed69899196cc21014e407f7ff74ee5636a8690ebd639fe0ca5abb
|
|
||||||
#RUN curl -L https://github.com/riboseinc/riffol/releases/download/0.1.0/riffol-$RIFFOL_VERSION.tar.gz -o /tmp/riffol-$RIFFOL_VERSION.tar.gz && \
|
RUN pip3 install --timeout=3600 click termcolor colorlog pymysql \
|
||||||
# echo "$RIFFOL_HASH /tmp/riffol-$RIFFOL_VERSION.tar.gz" | sha512sum --check && \
|
django && rm -r /root/.cache/pip
|
||||||
# tar -xvzf /tmp/riffol-$RIFFOL_VERSION.tar.gz -C /usr/sbin/ && \
|
|
||||||
# rm /tmp/riffol-$RIFFOL_VERSION.tar.gz
|
ADD https://raw.githubusercontent.com/haiwen/seahub/master/requirements.txt /tmp/hub-requirements.txt
|
||||||
|
|
||||||
|
RUN pip3 install --timeout=3600 -r /tmp/hub-requirements.txt
|
||||||
|
|
||||||
|
ADD https://raw.githubusercontent.com/haiwen/seafdav/master/requirements.txt /tmp/dav-requirements.txt
|
||||||
|
|
||||||
|
RUN pip3 install --timeout=3600 -r /tmp/dav-requirements.txt
|
||||||
|
|
||||||
COPY --from=riffol_build /usr/local/cargo/bin/riffol /usr/sbin/
|
COPY --from=riffol_build /usr/local/cargo/bin/riffol /usr/sbin/
|
||||||
|
|
||||||
@ -40,6 +45,10 @@ COPY scripts/setup.sh /usr/bin/setup
|
|||||||
RUN ulimit -n 30000 && mkdir -p $SEAF/pids && \
|
RUN ulimit -n 30000 && mkdir -p $SEAF/pids && \
|
||||||
chmod +x /usr/local/sbin/upgrade /usr/bin/setup
|
chmod +x /usr/local/sbin/upgrade /usr/bin/setup
|
||||||
|
|
||||||
|
RUN pip2 install requests scriptine
|
||||||
|
|
||||||
ENV SEAF_UPGRADE_INTERVAL=3
|
ENV SEAF_UPGRADE_INTERVAL=3
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s CMD (curl http://localhost:8000 || (echo "failed seahub"; exit 1)) && (curl http://localhost:8082 || (echo "failed seafhttp"; exit 1)) && (bash -c '[ $(curl --silent --output /dev/null --write-out "%{http_code}" http://localhost:8080) -eq 401 ]' || (echo "failed seafdav"; exit 1)) || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/sbin/riffol", "-f", "/etc/riffol.conf"]
|
ENTRYPOINT ["/usr/sbin/riffol", "-f", "/etc/riffol.conf"]
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
location /seafdav {
|
location /seafdav {
|
||||||
fastcgi_pass webdav;
|
proxy_pass http://webdav;
|
||||||
fastcgi_keep_conn on;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_script_name;
|
|
||||||
|
|
||||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
|
||||||
fastcgi_param QUERY_STRING $query_string;
|
|
||||||
fastcgi_param REQUEST_METHOD $request_method;
|
|
||||||
fastcgi_param CONTENT_TYPE $content_type;
|
|
||||||
fastcgi_param CONTENT_LENGTH $content_length;
|
|
||||||
fastcgi_param SERVER_ADDR $server_addr;
|
|
||||||
fastcgi_param SERVER_PORT $server_port;
|
|
||||||
fastcgi_param SERVER_NAME $server_name;
|
|
||||||
|
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,3 +4,4 @@ setuptools
|
|||||||
simplejson
|
simplejson
|
||||||
python-memcached
|
python-memcached
|
||||||
urllib3
|
urllib3
|
||||||
|
lxml
|
||||||
|
@ -21,7 +21,7 @@ function last_update {
|
|||||||
if [ -e "$LATEST/install_date" ]; then
|
if [ -e "$LATEST/install_date" ]; then
|
||||||
date -d $(cat "$LATEST/install_date") "+%s"
|
date -d $(cat "$LATEST/install_date") "+%s"
|
||||||
else
|
else
|
||||||
echo 0
|
echo 1000000
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user