Skip to content

Instantly share code, notes, and snippets.

@matdave
Last active October 25, 2024 20:13
Show Gist options
  • Save matdave/58faa5ad34a018d03ef3f9055929e67f to your computer and use it in GitHub Desktop.
Save matdave/58faa5ad34a018d03ef3f9055929e67f to your computer and use it in GitHub Desktop.
Using teleport in MODX Cloud

Install Composer

SSH into the primary clouds as the cXXXX user, then run the following commands:

> cd www
> sh -c "$(curl https://modx.co/scripts/install.sh)"
> source ~/.profile

Install Teleport

In the primary cloud run the following commands

> cd ~/
> git clone https://github.com/modxcms/teleport.git
> cd teleport
> git branch -v

If you get this error on the git clone: [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.

Then, run git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt and try the git clone again.

If you are MODX 2.x the branch should be “1.x”. If you are on MODX 3.x the branch should be “2.x”.

If it is using the wrong branch run the following commands:

> git fetch origin
> git checkout 2.x

Otherwise continue with the installation by running:

> composer install
> ./bin/teleport --action=Profile --name="Teleport" --code=teleport --core_path=/home/www/core/ --config_key=config

Running an Extract

Choose your extract template from the /tpl/ (e.g. elements.tpl.json) directory of teleport and run it like so:

> ./bin/teleport --action=Extract --profile=profile/teleport.profile.json --tpl=tpl/complete.tpl.json

Once complete your teleport file will be available in the /workspace/ directory of teleport.

Running an Inject

Choose your inject file from the /workspace/ directory of teleport and run it like so:

> ./bin/teleport --action=Inject --profile=profile/teleport.profile.json --source=workspace/teleport_complete-221129.1615.09-3.0.1-pl.transport.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment