Jarvis Panel

Sites

Deployments

Deploy a site's code from its Git repository. Each deployment pulls the latest commit from the site's branch and runs the site's deployment script.

Open a site and select Deployments in the site sidebar, or click Deployments on the site's overview page. The table lists every deployment with its ID, commit, date, status, duration, and release.

Deploy

  1. Click Deploy.
  2. Confirm the deployment.

The status shows Deploying while it runs, then Finished or Failed. Click a deployment to see its live Output.

If the deployment script is empty, Jarvisway warns you before deploying. Add one first.

Deployment script

The deployment script runs on every deployment, in the site's directory. To edit it, open the actions menu next to Deploy, click Deployment Script, change the script, and click Save.

New Laravel sites start with a script like this:

git pull origin $BRANCH

$PHP_PATH /usr/local/bin/composer install --no-dev --no-interaction --no-progress --optimize-autoloader

$PHP_PATH artisan migrate --force

$PHP_PATH artisan optimize

$PHP_PATH artisan queue:restart

Other site types start with their own script. Node.js sites run git pull, install dependencies with the site's package manager, and run its build command, then restart the app. Static sites run git pull origin $BRANCH.

Zero downtime script sections

On sites with zero downtime deployment, two lines split the script:

Line What happens there
$CREATE_RELEASE() The new release folder is cloned. Lines above it run in the site folder first.
$ACTIVATE_RELEASE() The site switches to the new release. Lines below it run in current, which now points at that release.

Lines between them run inside the new release. Put commands that restart long-running processes, such as queue:restart and inertia:stop-ssr, below $ACTIVATE_RELEASE() so the restarted workers start on the new code. Without these lines, the whole script runs inside the new release before the switch.

New zero downtime Laravel sites start with:

$CREATE_RELEASE()

$PHP_PATH /usr/local/bin/composer install --no-dev --no-interaction --no-progress --optimize-autoloader

$PHP_PATH artisan migrate --force

$PHP_PATH artisan optimize

$ACTIVATE_RELEASE()

$PHP_PATH artisan queue:restart

Script variables

Variable Value
$SITE_PATH The site's directory, for example /home/jarvis/example.com.
$DOMAIN The site's domain.
$BRANCH The branch being deployed.
$REPOSITORY The repository, for example organization/repository.
$COMMIT_ID The commit being deployed.
$PHP_VERSION The site's PHP version, for example 8.4.
$PHP_PATH The path to that PHP binary, for example /usr/bin/php8.4.

Auto deployment

With auto deployment on, Jarvisway adds a webhook to your repository and deploys the site whenever you push to its branch.

Open the actions menu next to Deploy and click Enable auto deploy, then confirm. Click it again to disable it. Auto deployment needs the site to be connected to a source control account.

Environment variables

To edit the site's .env file, open the actions menu next to Deploy and click Update .env.

  1. Check the Path to the .env file. Click the refresh button to reload it from the server.
  2. Edit the variables.
  3. Click Save.

Deploy again, or clear your app's config cache, for the changes to take effect.

Deployment details

Click a deployment to open it. You can see the commit message, its full Output, and from there:

  • Download log to save the output.
  • Rollback to go back to this release.
  • Delete to remove the deployment record.

The same actions are in the actions menu on each row of the deployments table.

Releases and rollback

Sites with zero downtime deployment deploy each commit into a new release folder and switch to it only when the deployment succeeds, so visitors never see a half-deployed site. Each deployment gets a Release.

To roll back, open a finished deployment that isn't the active one and click Rollback, then confirm. The site switches back to that release.

The number of releases kept for rollback is set by Deployments to keep in the zero downtime deployment settings.

Statuses

Status Meaning
Deploying The deployment is running.
Finished The deployment succeeded.
Failed A step failed. Open the deployment to see its output.