You are reading the documentation for an outdated Corteza release. 2024.9 is the latest stable Corteza release.

Deploying extensions

Setting up

To use the extension, it must be available to the Corredor server, either locally or on the server.

If you are running the Corredor without Docker (from source code), you can skip any Docker related steps.

We’ll assume that:
  • your current working directory is where your extension is,

  • your server deploy directory is /opt/deploy/test-project,

  • your file structure looks like this (where your Corteza is running):

data/
docker-compose.yml
.env
To use the extension:
  1. Create a new directory for the extension; we’ll name it corredor, but the name doesn’t matter.

  2. Somehow transport the extension source files into the newly created directory (see below sections for tips).

  3. Add a new volume to the docker-compose.yaml file that will contain the extension. For example, under the corredor service, volumes: [ "./corredor:/corredor/test-extension", …​other volumes you might have…​ ]

  4. Edit the .env (CORREDOR_EXT_SEARCH_PATHS variable) file to register the new extension. For example CORREDOR_EXT_SEARCH_PATHS=/extensions:/extensions/*:/corredor/test-extension.

  5. Reload the configurations (docker-compose up -d).

At the end, your file structure should look like this:

data/
docker-compose.yml
.env
corredor/
  test-extension/
    server-scripts/
      /...
    client-scripts/
      /...

CORREDOR_EXT_SEARCH_PATHS can contain multiple paths separated by colon (:).

You can use docker-compose logs -t --tail 100 -f corredor to see if the extension was registered and processed correctly.

Upload using git

If you are using git and a repository, we suggest you use that. Clone the repository onto your server (into the volume mentioned above). You can then pull the changes whenever the source code changes.

If it is a private repository, make sure that your git client on your server has access to it.

Upload manually

You can use scp, rsync, or any other client. Upload the extension’s source into the volume mentioned above.

I usually use rsync as it makes things a bit easier.

An example rsync command following the above assumptions; make sure to change the parameters:

rsync -av -e ssh --exclude="node_modules/" ./ SSH_USERNAME_HERE@ssh.remote.tld:/opt/deploy/test-project/corredor --delete;