Skip to content

Instantly share code, notes, and snippets.

@matdave
Last active November 29, 2022 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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
> curl http://modx.co/scripts/install.sh | 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: git@github.com: 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/elements.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 /workespace/ 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