diff --git a/server-ce/Dockerfile b/server-ce/Dockerfile index fd3fdc582c..aafc3c0903 100644 --- a/server-ce/Dockerfile +++ b/server-ce/Dockerfile @@ -80,6 +80,13 @@ COPY server-ce/config/custom-environment-variables.json /overleaf/services/histo ADD server-ce/bin/grunt /usr/local/bin/grunt RUN chmod +x /usr/local/bin/grunt +# Copy history helper scripts +# --------------------------- +ADD server-ce/bin/flush-history-queues /overleaf/bin/flush-history-queues +RUN chmod +x /overleaf/bin/flush-history-queues +ADD server-ce/bin/force-history-resyncs /overleaf/bin/force-history-resyncs +RUN chmod +x /overleaf/bin/force-history-resyncs + # File that controls open|closed status of the site # ------------------------------------------------- ENV SITE_MAINTENANCE_FILE "/etc/overleaf/site_status" diff --git a/server-ce/bin/flush-history-queues b/server-ce/bin/flush-history-queues new file mode 100755 index 0000000000..b54bc5558c --- /dev/null +++ b/server-ce/bin/flush-history-queues @@ -0,0 +1,8 @@ +#!/bin/bash + +set -euo pipefail + +source /etc/container_environment.sh +source /etc/overleaf/env.sh +cd /overleaf/services/project-history +node scripts/flush_all.js 100000 diff --git a/server-ce/bin/force-history-resyncs b/server-ce/bin/force-history-resyncs new file mode 100755 index 0000000000..389c98a4ad --- /dev/null +++ b/server-ce/bin/force-history-resyncs @@ -0,0 +1,8 @@ +#!/bin/bash + +set -euo pipefail + +source /etc/container_environment.sh +source /etc/overleaf/env.sh +cd /overleaf/services/project-history +node scripts/force_resync.js 1000 force