Cannot deploy due to confusing error regarding "invalid MONGO_VERSION"
I followed the official quick start guide trying to deploy a local instance.
$ git clone https://github.com/overleaf/toolkit.git ./overleaf-toolkit
$ cd ./overleaf-toolkit
$ bin/init
$ bin/up
Then error occured.
--------------------- ERROR -----------------------
Invalid MONGO_VERSION: MONGO_VERSION=6.0
MONGO_VERSION must start with the actual major version of mongo, followed by a dot.
Example: MONGO_IMAGE=my.dockerhub.com/custom-mongo
MONGO_VERSION=6.0-custom
--------------------- ERROR -----------------------
6.0 is the default value while the script reported error.
I tried something like 6.0.20, 8.0, 8.0.5 but same error message.
No configuration is modified.
Please help and thank in advanced!
Hi, I have the same issue. It seems that in the shared-function.sh, the parsing of the Mongo version in the overleaf.rc file failed. As a result, the variable mongo_version is set to "MONGO_VERSION=6.0" instead of just "6.0".
I've fixed it by replacing the function with the following:
function read_configuration() {
local name=$1
grep -E "^$name=" "$TOOLKIT_ROOT/config/overleaf.rc" | sed -r "s/^$name=//"
}
However, I'm facing another issue right now (and I don't know if it's related). I get the following error: realpath: data/overleaf: No such file or directory.
Edit : (I'm using Macos)
Btw an issue on this subject seems to already exist : https://github.com/overleaf/toolkit/issues/318
modify read_mongo_version() function in lib/shared-functions.sh