Applications1 min readUpdated

Git deploys and zero-downtime Magento releases

Connect a repository, add the deploy key, deploy a branch and roll back a release.

Connect an application to a Git repository and deploy a branch from the console. For Magento every deploy builds a complete new release and switches to it in one step, so visitors never see a half-built store.

Git deploys: repository address and branch.
Git deploys: repository address and branch.
  1. Connect the repository

    Enter the SSH address (for example git@github.com:company/site.git) and the branch.

  2. Add the deploy key

    The console shows a public key created for this application. Add it to the repository as a read-only deploy key (GitHub: Settings, Deploy keys).

  3. Deploy

    Press Deploy. The log shows each step.

What a Magento deploy does

  1. Fetches the code into a new folder under releases/.
  2. Links the shared paths: app/etc/env.php, pub/media, var/log and the other folders that must survive deploys.
  3. Runs composer install, setup:di:compile and a full setup:static-content:deploy.
  4. Runs setup:upgrade only when the database or configuration needs it (maintenance mode only for that step), after a database backup.
  5. Switches current to the new release, flushes the cache and reloads PHP.
  6. Keeps the last 5 releases.

Roll back

A rollback points current back to a previous release. It changes the code only, not the database.

Other platforms deploy either into a new release folder or by updating the code in place, with optional composer install and an npm build.

Did this solve it? If not, tell us what you see and we look at your server.

Open a ticket

Still stuck? Ask a person.

Tickets go straight to the engineers who run ShopWhizzy servers. Tell us the store, what you see and when it started, and we take it from there.