Merge branch 'logging'

This commit is contained in:
Gerrit Gogel 2021-01-24 16:03:17 +01:00
commit 1f708cf53c
6 changed files with 16 additions and 22 deletions

View file

@ -31,6 +31,11 @@ COPY scripts /scripts
RUN chmod u+x /scripts/* RUN chmod u+x /scripts/*
COPY --from=get /tmp/seafile-server-${SEAFILE_VERSION} /opt/seafile/seafile-server-${SEAFILE_VERSION} COPY --from=get /tmp/seafile-server-${SEAFILE_VERSION} /opt/seafile/seafile-server-${SEAFILE_VERSION}
RUN mkdir -p /opt/seafile/logs &&\
ln -sf /dev/stdout /opt/seafile/logs/seafile.log &&\
ln -sf /dev/stdout /opt/seafile/logs/controller.log &&\
ln -sf /dev/stdout /opt/seafile/logs/ccnet.log
EXPOSE 8080 8082 8001 EXPOSE 8080 8082 8001
CMD ["/scripts/start.sh"] CMD ["/scripts/start.sh"]

View file

@ -35,13 +35,11 @@ for d in ${dirs[*]}; do
done done
if [[ -e /shared/logs/seafile ]]; then if [[ -e /shared/logs/seafile ]]; then
mv /shared/logs/seafile /shared/seafile/logs rm -rf /shared/logs/seafile /shared/seafile/logs
rm -rf /opt/seafile/logs && ln -sf /shared/seafile/logs /opt/seafile/
else
mkdir -p /shared/seafile/logs && ln -sf /shared/seafile/logs /opt/seafile/
fi fi
if [[ -e /shared/seafile/logs ]]; then
if [[ ! -e /shared/logs/var-log ]]; then rm -rf /shared/seafile/logs
mkdir -p /shared/logs/ && mv /var/log /shared/logs/var-log fi
if [[ -e /shared/logs/var-log ]]; then
rm -rf /shared/logs/var-log
fi fi
rm -rf /var/log && ln -sf /shared/logs/var-log /var/log

View file

@ -9,4 +9,4 @@ while [ ! -S /opt/seafile/seafile-server-latest/runtime/seafile.sock ]; do
sleep 1 sleep 1
done done
socat -v -d -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever,keepalive socat -d -d TCP-LISTEN:8001,fork,reuseaddr UNIX:/opt/seafile/seafile-server-latest/runtime/seafile.sock,forever,keepalive

View file

@ -79,6 +79,9 @@ ENV SEAFILE_CONF_DIR=/opt/seafile/seafile-data
ENV SEAFILE_CENTRAL_CONF_DIR=/opt/seafile/conf ENV SEAFILE_CENTRAL_CONF_DIR=/opt/seafile/conf
ENV SEAFILE_RPC_PIPE_PATH=/opt/seafile/seafile-server-latest/runtime ENV SEAFILE_RPC_PIPE_PATH=/opt/seafile/seafile-server-latest/runtime
RUN mkdir -p /opt/seafile/logs &&\
ln -sf /dev/stdout /opt/seafile/logs/seahub.log
EXPOSE 8000 EXPOSE 8000
CMD ["/scripts/start.sh"] CMD ["/scripts/start.sh"]

View file

@ -33,15 +33,3 @@ for d in ${dirs[*]}; do
rm -rf /opt/seafile/$d && ln -sf $src /opt/seafile rm -rf /opt/seafile/$d && ln -sf $src /opt/seafile
fi fi
done done
if [[ -e /shared/logs/seafile ]]; then
mv /shared/logs/seafile /shared/seafile/logs
rm -rf /opt/seafile/logs && ln -sf /shared/seafile/logs /opt/seafile/
else
mkdir -p /shared/seafile/logs && ln -sf /shared/seafile/logs /opt/seafile/
fi
if [[ ! -e /shared/logs/var-log ]]; then
mkdir -p /shared/logs/ && mv /var/log /shared/logs/var-log
fi
rm -rf /var/log && ln -sf /shared/logs/var-log /var/log

View file

@ -3,7 +3,7 @@
/scripts/create_data_links.sh /scripts/create_data_links.sh
mkdir -p /opt/seafile/seafile-server-latest/runtime mkdir -p /opt/seafile/seafile-server-latest/runtime
socat -v -d -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive & socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive &
python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000 python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000