* Add scripts to rebrand variables.env and overleaf.rc
* Update bin/upgrade to prompt for config file rebrand
* Update bin/up to check for correct variable prefix
Ensures SHARELATEX_ is in place for version <= 4.x, and
OVERLEAF_ for version >= 5.x
* Rebrand variables for bin/docker-compose
Updates docker-compose.base.yml and sibling containers
base file with the changes in the script
* Update bin/doctor to support OVERLEAF_ prefix
* Update documentation with the OVERLEAF_ prefix
* Rebrand variables.env and overleaf.rc in config-seed
* Prepare config/version and CHANGELOG for release (WIP)
* Fix script documentation
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Fix doctor logs
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Remove unnecessary fallbacks to SHARELATEX_ vars
* SEt OVERLEAF_DATA_PATH to data/overleaf
* Remove duplicated environment entries
* Moved prefix brand checs from bin/up to bin/docker-compose
* Move set +o pipefail into subshell commands
* Use separate legacy compose files for required SHARELATEX_ vars
* Handle overleaf.rc rebranding before version upgrade
* Group output from rebranding process
* Move prompt for rebranding into helper function
* Refuse to start with mismatching ShareLaTeX vs Overleaf branded configs
* Print expected prefix when checking variables.env
* Print number of mismatching variables in overleaf.rc
* Check on variable rebranding from bin/doctor
* Cleanup bin/doctor lookup for ShareLaTeX branded overleaf.rc
* Update filesystem paths in bin/logs and docs
* Flag old TEXMFVAR entry in config/variables.env
REF: 1829e7ee2a
* Update config-seed version to 5.0.1 and changelog
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
2.9 KiB
Working with Docker Compose Services
The Overleaf Toolkit runs Overleaf inside a docker container, plus the
supporting databases (MongoDB and Redis), in their own containers. All of this
is orchestrated with docker compose
.
Note: for legacy reasons, the main Overleaf container is called sharelatex
,
and is based on the sharelatex/sharelatex
docker image. This is because the
technology is based on the ShareLaTeX code base, which was merged into Overleaf.
See this blog
post
for more details. At some point in the future, this will be renamed to match the
Overleaf naming scheme.
The bin/docker-compose
Wrapper
The bin/docker-compose
script is a wrapper around docker compose
. It
loads configuration from the config/
directory, before invoking
docker compose
with whatever arguments were passed to the script.
You can treat bin/docker-compose
as a transparent wrapper for the
docker compose
program installed on your machine.
For example, we can check which containers are running with the following:
$ bin/docker-compose ps
Convenience Helpers
In addition to bin/docker-compose
, the toolkit also provides a collection of
convenient scripts to automate common tasks:
bin/up
: shortcut forbin/docker-compose up
bin/start
: shortcut forbin/docker-compose start
bin/stop
: shortcut forbin/docker-compose stop
bin/shell
: starts a shell inside the main container
Architecture
Inside the overleaf container, the Overleaf software runs as a set of micro-services, managed by runit
. Some of the more interesting files inside the container are:
/etc/service/
: initialisation files for the microservices/etc/overleaf/settings.js
: unified settings file for the microservices/var/log/overleaf/
: logs for each microservice/var/www/overleaf/
: code for the various microservices/var/lib/overleaf/
: the mount-point for persistent data (corresponds to the directory indicated byOVERLEAF_DATA_PATH
on the host)
Before Server Pro/Community Edition version 5.0, the paths used the ShareLaTeX brand.
The MongoDB and Redis Containers
Overleaf dedends on two external databases: MongoDB and Redis. By default, the toolkit will provision a container for each of these databases, in addition to the Overleaf container, for a total of three docker containers.
If you would prefer to connect to an existing MongoDB or Redis instance, you can do so by setting the appropriate settings in the overleaf.rc configuration file.
Viewing Individual Micro-Service Logs
The bin/logs
script allows you to select individual log streams from inside the overleaf container.
For example, if you want to see just the logs for the web
and clsi
(compiler) micro-services, run:
$ bin/logs -f web clsi
See the output of bin/logs --help
for more options.