Official Deploy and Composer plugins (beta)
Mike
The first official Abstrax plugins are available: Deploy and Composer.
They install from the plugin registry like any other plugin, show up as abstrax deploy and abstrax composer, and they are beta. Current versions are 0.2.x. They have not reached 1.0.0 yet, so expect changes before a stable release.
Update to a recent Abstrax CLI first (2.3.1 or later), then install from the registry:
sudo abstrax plugin install composer
sudo abstrax plugin install deploy
Browse the listings at plugins.useabstrax.com, or go straight to Composer and Deploy.
Composer
This plugin installs Composer on the server and keeps it up to date. Use abstrax composer run against a project and it picks that project's PHP version and user, so you are not stuck with whatever php happens to be on the PATH.
sudo abstrax composer setup
abstrax composer status
abstrax composer run --project=example.com install --no-dev --optimize-autoloader
Full command reference: Composer plugin docs.
Deploy
Once a project exists on the server, Deploy clones the GitHub repo into a new release, runs any hooks, then switches the live site over. If that fails part way through, the current site is left as it is.
GitHub only for now. Presets cover Laravel, Node, Ruby, and static sites.
sudo abstrax deploy setup example.com \
--repository=git@github.com:acme/app.git \
--branch=main \
--preset=laravel \
--no-first-deploy
abstrax deploy key example.com --show # add as a GitHub deploy key (read-only)
sudo abstrax deploy now example.com --yes
abstrax deploy status example.com
Rollback, hooks, and --ref for a branch, tag, or SHA are in the Deploy plugin docs.
Using them together
The Laravel preset's after_clone hook calls abstrax composer run. Install both plugins, run composer setup, then deploy setup with --preset=laravel. Shared .env and storage are scaffolded for you; existing non-empty .env files are left alone.
Try them out
These are the first official plugins, and they are still beta. Things may change before 1.0.0.
If you try them, I would like to hear how they behave on real servers. Start with the official plugins overview, the plugin commands, and the registry.