first commit

This commit is contained in:
2025-04-24 13:11:28 +08:00
commit ff9c54d5e4
5960 changed files with 834111 additions and 0 deletions

View File

@@ -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

View File

@@ -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

36
server-ce/bin/grunt Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# Thin wrapper on old grunt tasks to ease migrating.
set -e
set -x
TASK="$1"
shift 1
cd /overleaf/services/web
case "$TASK" in
user:create-admin)
echo "The grunt command is deprecated, run the create-user script using node instead"
node modules/server-ce-scripts/scripts/create-user.mjs --admin "$@"
;;
user:delete)
echo "The grunt command is deprecated, run the delete-user script using node instead"
node modules/server-ce-scripts/scripts/delete-user.mjs "$@"
;;
check:mongo)
echo "The grunt command is deprecated, run the check-mongodb script using node instead"
node modules/server-ce-scripts/scripts/check-mongodb.mjs
;;
check:redis)
echo "The grunt command is deprecated, run the check-redis script using node instead"
node modules/server-ce-scripts/scripts/check-redis.mjs
;;
*)
echo "Unknown task $TASK"
exit 1
;;
esac

View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail
FILE=${1:-docker-compose.yml}
if [[ ! -f "$FILE" ]]; then
echo "Expected to find $FILE, are you in the wrong directory?"
exit 2
fi
BACKUP_FILE="$FILE.$(date '+%Y.%m.%d-%H.%M.%S')"
echo "Creating backup file $BACKUP_FILE"
cp "$FILE" "$BACKUP_FILE"
echo "Replacing 'SHARELATEX_' with 'OVERLEAF_' in $FILE"
sed -i "s/SHARELATEX_/OVERLEAF_/g" "$FILE"
echo "Done."

1
server-ce/bin/shared Symbolic link
View File

@@ -0,0 +1 @@
../../bin/shared/