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. |
-
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
-
Create a new directory for the extension; we’ll name it
corredor, but the name doesn’t matter. -
Somehow transport the extension source files into the newly created directory (see below sections for tips).
-
Add a new volume to the
docker-compose.yamlfile that will contain the extension. For example, under thecorredorservice,volumes: [ "./corredor:/corredor/test-extension", …other volumes you might have… ] -
Edit the
.env(CORREDOR_EXT_SEARCH_PATHSvariable) file to register the new extension. For exampleCORREDOR_EXT_SEARCH_PATHS=/extensions:/extensions/*:/corredor/test-extension. -
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/
/...
|
|
|
You can use |
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 |
|
An example
|