Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternatives for MongoDB 5.0+ #216

Open
nonodev96 opened this issue Feb 8, 2024 · 1 comment
Open

Alternatives for MongoDB 5.0+ #216

nonodev96 opened this issue Feb 8, 2024 · 1 comment

Comments

@nonodev96
Copy link

Hi, we are using an old server just for overleaf but with the new toolkit it doesn't work because mongodb 5.0+ requires a CPU with AVX support.

Is there any alternative to MongoDB 5.0+?

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!

Context

This works with sharelatex version 3.3.0 but not with versions 4+.

Any alternative to have a more updated version of sharelatex?

Technical Information

OS: Ubuntu Server 22.04
CPU: dual core Intel Xeon 3065

Steps to install overleaf in old servers

Install docker compose legacy and set sharelatex to version 3.3.0 because the toolkit not works.

@Zalk0
Copy link

Zalk0 commented Mar 15, 2024

Hey,
I based myself on the docker compose files in the overleaf and the toolkit repo to do this one for my friend who's got an old server which cannot run Mongo 5.
Overleaf is on port 8008 and works. I customized the container names so that it doesn't conflict with another mongo container by example.
And there's one thing to do the first time you do the docker compose up, it's running a command to setup MongoDB:

docker exec leaf-mongo mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"

The Docker Compose YAML:

services:
    sharelatex:
        restart: always
        image: sharelatex/sharelatex:4.2.3
        container_name: leaf-sharelatex
        depends_on:
            mongo:
                condition: service_healthy
            redis:
                condition: service_started
        ports:
            - 8008:80
        links:
            - mongo
            - redis
        stop_grace_period: 60s
        volumes:
            - ~/overleaf/sharelatex:/var/lib/sharelatex
        environment:
            SHARELATEX_APP_NAME: Zalko's Overleaf

            SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex

            # Same property, unfortunately with different names in
            # different locations
            SHARELATEX_REDIS_HOST: redis
            REDIS_HOST: redis

            ENABLED_LINKED_FILE_TYPES: "project_file,project_output_file"

            # Enables Thumbnail generation using ImageMagick
            ENABLE_CONVERSIONS: "true"

            # Disables email confirmation requirement
            EMAIL_CONFIRMATION_DISABLED: "true"

            # temporary fix for LuaLaTex compiles
            # see https://github.com/overleaf/overleaf/issues/695
            TEXMFVAR: /var/lib/sharelatex/tmp/texmf-var

    mongo:
        restart: always
        image: mongo:4.4
        container_name: leaf-mongo
        command: "--replSet overleaf"
        expose:
            - 27017
        volumes:
            - ~/overleaf/mongo:/data/db
        healthcheck:
            test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
            interval: 10s
            timeout: 10s
            retries: 5

    redis:
        restart: always
        image: redis:6.2
        container_name: leaf-redis
        expose:
            - 6379
        volumes:
            - ~/overleaf/redis:/data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants