Selfhost Overleaf using Ansible and Docker
I’ve been wanting to automate the deployment of all my docker services using Ansible for some time and, unfortunately, I haven’t found the moment yet.
A new service to host arrived to my setup, and I wanted to make things right from the beginning.
These days I’ve been interested in self-hosting Overleaf, given that I’m doing my final degree project and I want to share the document with my mentors.
Overleaf (the website, not the app) is limited to only 2 collaborators and git integration is a paid feature. So, given that it is open source, I thought that I should just self-host it.
I adaptated a little bit the docker-compose.yml
provided in the official overleaf repository and that is basically all I did. Then, I made an ansible playbook to automate the deployment on remote servers.
During the developement of the playbook, I added some vars that made simple changes to the docker-compose.yml
file, allowing to adapt the installation to the user needs.
However, the installation can be much more customized given the example compose file provided, but I simplified it to have only the most common options (at least to my use case).
Here is the project git repository, which contains a README showing how to use the ansible playbook and explaining what each variable is for.