mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
add logger function, send log to /proc/1/fd/1
This commit is contained in:
parent
2c3437df5d
commit
4a12869de9
|
@ -83,11 +83,12 @@ 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 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
|
||||
|
||||
|
|
|
@ -36,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 ${!}
|
||||
|
@ -46,4 +50,5 @@ start_socat &
|
|||
init_seahub
|
||||
start_seahub &
|
||||
watch_server &
|
||||
logger
|
||||
keep_running
|
Loading…
Reference in a new issue