Docker compose yml outdated?
Docker compose yml outdated? Please update it
Also facing problems running it. Mongo seems to be the issue.
Hi there, sorry you're having trouble. So we can look into this for you, please can you provide us with some details of the error message(s) you're seeing? Can you confirm that you're using the docker-compose.yml file with the Server Pro environment variables commented out?
Important: Overleaf Community Edition is intended for use in environments where all users are trusted. Community Edition is not appropriate for scenarios where isolation of users is required due to Sandbox Compiles not being available. When not using Sandboxed Compiles, users have full read and write access to the sharelatex container resources (filesystem, network, environment variables) when running LaTeX compiles.
For more information on Sandbox Compiles, check out our documentation.
I can confirm that running the docker-compose file as is, leads to connections failing: curl -v just shows connection refused.
What changes to the environment variables must be done to the plain compose file?
Hey @miguelmarco, to run the Community Edition using the example docker-compose.yml, you should only need to comment out the Server Pro specific variables (SANDBOXED_COMPILES, SANDBOXED_COMPILES_HOST_DIR_COMPILES, SANDBOXED_COMPILES_HOST_DIR_OUTPUT, DOCKER_RUNNER, and SANDBOXED_COMPILES_SIBLING_CONTAINERS).
If you haven't already done so, you'll need to take a copy of the mongodb-init-replica-set.js script and update the path to it in your docker-compose.yml file according to your directory structure.
Without access to your logs, it's challenging to determine the issue, but it's possible that the mongo service can't start due to the replica set not being initialized.
Unless there is a specific requirement to use a docker-compose.yml file, I'd recommend getting started with the Overleaf Toolkit (documentation) as it includes scripts to make running on-premises versions of Overleaf easier to deploy, upgrade, and maintain.
I hope this helps.
There is a mix of things you must uncomment and things you must comment if you use community version.
The compose file should be valid for community version OR pro version. In this case it's valid for none.
Also a comment to explain to copy the mongodb-init-replica-set.js would be nice even if I don't understand why we have to do that.
I totally agree. It’s not okay to mix the content and variables of both versions, because the application doesn’t throw any errors to indicate that you’ve enabled variables for the Pro version instead of using the Community one. I think this is a major downside for new users who want to explore the Community product first and then purchase the Pro version if needed.
I was still getting errors initializing mongo with instructions from @mlevans0 above. This fixed it for me: #1263. Thanks to @rahatzamancse.
Hey @jdwake, I'm glad you were able to resolve the issue, and thanks for your feedback @MadalinNitu -- it's much appreciated! I'll make sure to forward it to the Engineering team.
As mentioned in my previous comment, unless there is a specific requirement to use a docker-compose.yml file, we would always recommend using the Overleaf Toolkit (documentation) as it includes scripts to make running on-premises versions of Overleaf (CE and SP) easier to deploy, upgrade, and maintain (this includes setting up a replica set which was the issue here).
As the Community Edition is intended for use in environments where all users are trusted, the decision was made to have the example docker-compose.yml file's default settings be the most secure option with Sandboxed Compiles enabled.
Commenting out the required lines or having two separate Docker Compose files could lead to Server Pro deployments with reduced security, which is something we would want to avoid.
For now, I hope this adds some additional context, and once again, thanks for the feedback!