Back to Overleaf

Overleaf Community Edition, development environment

develop/README.md

0.2.02.4 KB
Original Source

Overleaf Community Edition, development environment

Building and running

In this develop directory, build the services:

shell
bin/build

[!NOTE] If Docker is running out of RAM while building the services in parallel, create a .env file in this directory containing COMPOSE_PARALLEL_LIMIT=1.

Then start the services:

shell
bin/up

Once the services are running, open http://localhost/launchpad to create the first admin account.

Development

To avoid running bin/build && bin/up after every code change, you can run Overleaf Community Edition in development mode, where services will automatically update on code changes.

To do this, use the included bin/dev script:

shell
bin/dev

This will start all services using node --watch, which will automatically monitor the code and restart the services as necessary.

To improve performance, you can start only a subset of the services in development mode by providing a space-separated list to the bin/dev script:

shell
bin/dev [service1] [service2] ... [serviceN]

[!NOTE] Starting the web service in development mode will only update the web service when backend code changes. In order to automatically update frontend code as well, make sure to start the webpack service in development mode as well.

If no services are named, all services will start in development mode.

Debugging

When run in development mode most services expose a debugging port to which you can attach a debugger such as the inspector in Chrome's Dev Tools or one integrated into an IDE. The following table shows the port exposed on the host machine for each service:

ServicePort
web9229
clsi9230
chat9231
contacts9232
docstore9233
document-updater9234
filestore9235
notifications9236
real-time9237
history-v19239
project-history9240

To attach to a service using Chrome's remote debugging, go to chrome://inspect/ and make sure Discover network targets is checked. Next click Configure... and add an entry localhost:[service port] for each of the services you want to attach a debugger to.

After adding an entry, the service will show up as a Remote Target that you can inspect and debug.