MatthewL246 / pretendo-docker

An unofficial Docker Compose setup for self-hosting a Pretendo Network server.
https://matthewl246.github.io/pretendo-docker/
GNU Affero General Public License v3.0
54 stars 9 forks source link

Changing mongodb version #81

Closed SoftModems closed 5 months ago

SoftModems commented 5 months ago

Hello, I have an older system which does not support AVX which mongodb requires from version 5.0 <=. I am not very good with docker or mongodb and i was wondering if someone could help me change the version of mongodb used in the scripts. I tried to initalise the container myself and exclude the mongodb script from the setup.sh file with no real success. Thank you in advance.

MatthewL246 commented 5 months ago

You can edit the compose.yml file and change the line image: mongo:latest to image: mongo:your-version-tag based on Mongo tags list. According to Google, 4.4 should be a safe version for non-AVX support, but I can't confirm that, so you might have to try a few versions.

I tested this, and there is one small issue with older versions like 4.4. The database management tool is named mongo instead of mongosh, so you'll need to edit scripts/internal/firstrun-mongodb-container.sh to replace the 2 instances of mongosh with mongo.

I should also add that I can't guarantee that this will continue working in the future - the Pretendo servers might start using features that require newer MongoDB versions.

SoftModems commented 5 months ago

Wow tysm i just expected to get some "google it" responces. I cant belive i would ever be able to get this running haha. I definetly need a new server soon but this should carry me over the line, thankks!!

MatthewL246 commented 5 months ago

You're welcome! That's the nice thing about having a smaller project without too much activity, I have the time to respond to and test out smaller requests like this :)