Loading README.md +30 −23 Original line number Diff line number Diff line Loading @@ -30,27 +30,6 @@ If you want to permanently remove ShareLaTeX from your docker containers: docker rm sharelatex ``` ### Storing Data The `-v ~/sharelatex_data:/var/lib/sharelatex` option in the `run` command tells Docker to make the host directory `~/sharelatex_data` available inside the container for ShareLaTeX to store data files in. This means that you can back up and access these files manually outside of the ShareLaTeX container. If you would like to store ShareLaTeX data in a different location, such as `/home/james/my_data`, just change this parameter: ``` $ docker run -d \ -v /home/james/my_data:/var/lib/sharelatex \ -p 80 \ --name=sharelatex \ sharelatex/sharelatex ``` Do not change the second part of this parameter (after the :). This is only where ShareLaTeX stores on-disk data. Other data is also stored in Mongo and Redis. ### Mongo and Redis ShareLaTeX depends on [MongoDB](http://www.mongodb.org/) (must be 2.4 or later), and Loading @@ -61,12 +40,19 @@ By default the ShareLaTeX Docker container looks for these running on the host machine at port 27017 (for Mongo) and port 6379 (for Redis). These are the defaults ports for both databases so you shouldn't need to change them. Note that Docker containers each come with their own network stack, and Mongo and Redis often listen by default on `127.0.0.1` which is not accessible on the host from inside the Docker container. Instead, you should configure Mongo and Redis to also listen on `172.17.42.1` (or whatever ip iddress the docker0 interface has on your host). This can be done in `/etc/mongod.conf` and `/etc/redis/redis.conf`. If you want to point ShareLaTeX at a database in a different location, you can configure the container with environment variables. See the **Configuration Options** section below. *Note that `localhost` in the container refers only to the container, so if you want to access services on the host machine then you should use `dockerhost`.* For example: want to access services on the host machine then you should use `dockerhost`. `dockerhost` refers to the the `172.17.42.1` ip address mentioned above.* For example: ``` $ docker run -d \ Loading @@ -77,6 +63,27 @@ $ docker run -d \ sharelatex/sharelatex ``` ### Storing Data The `-v ~/sharelatex_data:/var/lib/sharelatex` option in the `run` command tells Docker to make the host directory `~/sharelatex_data` available inside the container for ShareLaTeX to store data files in. This means that you can back up and access these files manually outside of the ShareLaTeX container. If you would like to store ShareLaTeX data in a different location, such as `/home/james/my_data`, just change this parameter: ``` $ docker run -d \ -v /home/james/my_data:/var/lib/sharelatex \ -p 80 \ --name=sharelatex \ sharelatex/sharelatex ``` Do not change the second part of this parameter (after the :). This is only where ShareLaTeX stores on-disk data. Other data is also stored in Mongo and Redis. ### Backups To backup the ShareLaTeX data, you need to backup the directory you have attached Loading Loading
README.md +30 −23 Original line number Diff line number Diff line Loading @@ -30,27 +30,6 @@ If you want to permanently remove ShareLaTeX from your docker containers: docker rm sharelatex ``` ### Storing Data The `-v ~/sharelatex_data:/var/lib/sharelatex` option in the `run` command tells Docker to make the host directory `~/sharelatex_data` available inside the container for ShareLaTeX to store data files in. This means that you can back up and access these files manually outside of the ShareLaTeX container. If you would like to store ShareLaTeX data in a different location, such as `/home/james/my_data`, just change this parameter: ``` $ docker run -d \ -v /home/james/my_data:/var/lib/sharelatex \ -p 80 \ --name=sharelatex \ sharelatex/sharelatex ``` Do not change the second part of this parameter (after the :). This is only where ShareLaTeX stores on-disk data. Other data is also stored in Mongo and Redis. ### Mongo and Redis ShareLaTeX depends on [MongoDB](http://www.mongodb.org/) (must be 2.4 or later), and Loading @@ -61,12 +40,19 @@ By default the ShareLaTeX Docker container looks for these running on the host machine at port 27017 (for Mongo) and port 6379 (for Redis). These are the defaults ports for both databases so you shouldn't need to change them. Note that Docker containers each come with their own network stack, and Mongo and Redis often listen by default on `127.0.0.1` which is not accessible on the host from inside the Docker container. Instead, you should configure Mongo and Redis to also listen on `172.17.42.1` (or whatever ip iddress the docker0 interface has on your host). This can be done in `/etc/mongod.conf` and `/etc/redis/redis.conf`. If you want to point ShareLaTeX at a database in a different location, you can configure the container with environment variables. See the **Configuration Options** section below. *Note that `localhost` in the container refers only to the container, so if you want to access services on the host machine then you should use `dockerhost`.* For example: want to access services on the host machine then you should use `dockerhost`. `dockerhost` refers to the the `172.17.42.1` ip address mentioned above.* For example: ``` $ docker run -d \ Loading @@ -77,6 +63,27 @@ $ docker run -d \ sharelatex/sharelatex ``` ### Storing Data The `-v ~/sharelatex_data:/var/lib/sharelatex` option in the `run` command tells Docker to make the host directory `~/sharelatex_data` available inside the container for ShareLaTeX to store data files in. This means that you can back up and access these files manually outside of the ShareLaTeX container. If you would like to store ShareLaTeX data in a different location, such as `/home/james/my_data`, just change this parameter: ``` $ docker run -d \ -v /home/james/my_data:/var/lib/sharelatex \ -p 80 \ --name=sharelatex \ sharelatex/sharelatex ``` Do not change the second part of this parameter (after the :). This is only where ShareLaTeX stores on-disk data. Other data is also stored in Mongo and Redis. ### Backups To backup the ShareLaTeX data, you need to backup the directory you have attached Loading