A folder with name sharelatex (lower case) should have been created and contain the configuration file,
which in our case is /home/SHARELATEX/sharelatex/docker-compose.yml. Edit it with your_favourite_editor
but WARNING: do not use tabs and make sure your editor does not use them silently. .yml files must be indented with spaces.
In this file, change the following lines:
Under the sharelatex: section:
ports:
- 80:80
by
ports:
- 127.0.0.1:4665:80
(Exception: if you chose not to use your web server but that of ShareLaTeX, don't change this line.)
By the way, 4665 could be any other port number between 1024 and 65535 you wish, as long as no other service in you machine is using it.
Also, change
volumes:
- ~/sharelatex_data:/var/lib/sharelatex
by
volumes:
- /home/SHARELATEX/sharelatex_data:/var/lib/sharelatex
and also in this section, set the values of these variables (un-commenting them if needed):
SHARELATEX_APP_NAME: ShareLaTeX private (or any other name you wish...)
SHARELATEX_SITE_URL: http://myhost.mydomain (yes, it is http. Later in the server we'll map it to https).
SHARELATEX_ADMIN_EMAIL: your.email@your.domain (set here the mail of the person who will maintain ShareLaTeX).
SHARELATEX_EMAIL_FROM_ADDRESS: an.email@at.your.domain (this one is the address from which the messages sent by
ShareLaTeX will say to come from. Only needed if you configure the mail sender; I haven't done and it is not covered in this tutorial. Sorry.)
Now, under section mongo: change:
volumes:
- ~/mongo_data:/data/db
by
volumes:
- /home/SHARELATEX/mongo_data:/data/db
and finally, under section redis: change:
volumes:
- ~/redis_data:/data
by
volumes:
- /home/SHARELATEX/redis_data:/data
This will make the folders inside the container which have the important information live really outside, where
they will be available for us to see them and make backups. This is the reason I choose to map them to a folder outside
the root partition: have all of them grouped and be sure them not to be accidentally erased by a system reinstall.
But in any case, do NOT change the internal paths (those after the : )