mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-22 21:13:34 +00:00
[hotfix] produce version 2.5.1 with fixes for log rotation
This commit is contained in:
parent
5584ed78ad
commit
1d8ed4bb23
3 changed files with 31 additions and 0 deletions
13
server-ce/hotfix/2.5.1/Dockerfile
Normal file
13
server-ce/hotfix/2.5.1/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM sharelatex/sharelatex:2.5.0
|
||||
|
||||
# Patch #826: Fixes log path for contacts service to be picked up by logrotate
|
||||
COPY contacts-run.patch /etc/service/contacts-sharelatex
|
||||
RUN cd /etc/service/contacts-sharelatex && patch < contacts-run.patch
|
||||
|
||||
# Patch #826: delete old logs for the contacts service
|
||||
COPY delete-old-logs.patch /etc/my_init.d
|
||||
RUN cd /etc/my_init.d && patch < delete-old-logs.patch \
|
||||
&& chmod +x /etc/my_init.d/10_delete_old_logs.sh
|
||||
|
||||
# Patch #827: fix logrotate file permissions
|
||||
RUN chmod 644 /etc/logrotate.d/sharelatex
|
8
server-ce/hotfix/2.5.1/contacts-run.patch
Normal file
8
server-ce/hotfix/2.5.1/contacts-run.patch
Normal file
|
@ -0,0 +1,8 @@
|
|||
--- a/run
|
||||
+++ b/run
|
||||
@@ -7,4 +7,4 @@ if [ "$DEBUG_NODE" == "true" ]; then
|
||||
NODE_PARAMS="--inspect=0.0.0.0:30360"
|
||||
fi
|
||||
|
||||
-exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts 2>&1
|
||||
+exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts.log 2>&1
|
10
server-ce/hotfix/2.5.1/delete-old-logs.patch
Normal file
10
server-ce/hotfix/2.5.1/delete-old-logs.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- /dev/null
|
||||
+++ b/10_delete_old_logs.sh
|
||||
@@ -0,0 +1,7 @@
|
||||
+#!/bin/sh
|
||||
+set -e
|
||||
+
|
||||
+# Up to version 2.5.0 the logs of the contacts service were written into a
|
||||
+# file that was not picked up by logrotate.
|
||||
+# The service is stable and we can safely discard any logs.
|
||||
+rm -vf /var/log/sharelatex/contacts
|
Loading…
Reference in a new issue