mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
Merge branch 'cron-gc'
This commit is contained in:
commit
5de8c009bc
|
@ -8,6 +8,8 @@ RUN cd /tmp && \
|
|||
tar -zxvf seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
|
||||
rm -f seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz
|
||||
|
||||
RUN sed -i "s@.*INNER_FILE_SERVER_ROOT.*@INNER_FILE_SERVER_ROOT = os.environ.get('INNER_FILE_SERVER_ROOT')@" /tmp/seafile-server-${SEAFILE_VERSION}/seahub/seahub/settings.py
|
||||
|
||||
FROM alpine:3.13 AS pip
|
||||
|
||||
RUN apk add --no-cache \
|
||||
|
@ -28,28 +30,15 @@ libmemcached-dev
|
|||
|
||||
RUN python3 -m pip install --upgrade pip &&\
|
||||
pip3 install --timeout=3600 \
|
||||
Django==2.2.14 \
|
||||
future \
|
||||
captcha \
|
||||
django-statici18n \
|
||||
django-post_office==3.3.0 \
|
||||
django-webpack_loader \
|
||||
gunicorn \
|
||||
mysqlclient \
|
||||
django-picklefield==2.1.1 \
|
||||
openpyxl \
|
||||
qrcode \
|
||||
django-formtools \
|
||||
django-simple-captcha \
|
||||
djangorestframework==3.11.1 \
|
||||
python-dateutil \
|
||||
requests \
|
||||
pillow \
|
||||
captcha \
|
||||
pyjwt \
|
||||
pycryptodome \
|
||||
requests_oauthlib \
|
||||
django==2.2.* \
|
||||
django-pylibmc \
|
||||
configparser \
|
||||
django-simple-captcha \
|
||||
django-pylibmc \
|
||||
django-simple-captcha \
|
||||
&& rm -r /root/.cache/pip
|
||||
|
||||
FROM alpine:3.13
|
||||
|
@ -83,11 +72,13 @@ ENV CCNET_CONF_DIR=/opt/seafile/conf/ccnet
|
|||
ENV SEAFILE_CONF_DIR=/opt/seafile/seafile-data
|
||||
ENV SEAFILE_CENTRAL_CONF_DIR=/opt/seafile/conf
|
||||
ENV SEAFILE_RPC_PIPE_PATH=/opt/seafile/seafile-server-latest/runtime
|
||||
ENV INNER_FILE_SERVER_ROOT=http://seafile-server:8082
|
||||
ENV SEAHUB_LOG_DIR=/opt/seafile/logs
|
||||
ENV SEAFILE_ADMIN_EMAIL=me@example.com
|
||||
ENV SEAFILE_ADMIN_PASSWORD=asecret
|
||||
|
||||
RUN mkdir -p /opt/seafile/logs &&\
|
||||
ln -sf /dev/stdout /opt/seafile/logs/seahub.log
|
||||
touch /opt/seafile/logs/seahub.log
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
|
|
@ -13,11 +13,13 @@ function start_seahub {
|
|||
|
||||
function start_socat {
|
||||
mkdir -p /opt/seafile/seafile-server-latest/runtime
|
||||
while ! nc -z seafile-server 8001 2>/dev/null; do
|
||||
sleep 1
|
||||
while true; do
|
||||
while ! nc -z seafile-server 8001 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
echo "Starting socat..."
|
||||
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2
|
||||
done
|
||||
echo "Starting socat..."
|
||||
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2
|
||||
}
|
||||
|
||||
function watch_server {
|
||||
|
@ -34,6 +36,10 @@ function watch_server {
|
|||
done
|
||||
}
|
||||
|
||||
function logger {
|
||||
tail -f /opt/seafile/logs/seahub.log | tee /proc/1/fd/1
|
||||
}
|
||||
|
||||
function keep_running {
|
||||
while true; do
|
||||
tail -f /dev/null & wait ${!}
|
||||
|
@ -44,4 +50,5 @@ start_socat &
|
|||
init_seahub
|
||||
start_seahub &
|
||||
watch_server &
|
||||
logger
|
||||
keep_running
|
Loading…
Reference in a new issue