# Overleaf Setup ## Getting started 1. Upload the docker-compose.yaml to the server directory. 2. Start the MongoDB alone using `docker compose up -d mongo` and wait about 15 seconds for it to start. 3. Execute the script [setup-replica-set.sh](setup-replica-set.sh) to create the ReplicaSet, required by the sharedlatex container 4. Now start all other containers using `docker compose up -d` ## Docker Overview 1. What does the Compose stack contain? ``` The compose stack consists of three containers. The sharelatex container is the actual Overleaf application, containing the frontend and the backend of the application. It requires two different datasources, a MongoDB and a Redis. ``` 2. How to access the application? ``` The docker-compose.yaml file in this repository is setup to automatically connect to a running [Treafik](https://traefik.io) instance. If a different reverse proxy is used, the traefik labels can be removed and the required configuration has to be added. ``` 3. Why setting up a ReplicaSet with a single MongoDB instance? ``` The Overleaf application depends on using transactions. Transactions are only supported by MongoDB if a Replica Set is active. ``` 4. Where is the data stored? ``` All relevant data from each container is bound to a Docker volume each. ```