Skip to content

Type a word or two, like firewall or rollback.

Open Coresmith
Browse the docs
Apps Checked against Coresmith 0.8.35.

Deploy and roll back

Open as Markdown

Deploy

Choose Deploy on the app's page. The live log shows each step as it runs:

StepWhat happens
Clone releaseCoresmith gets the branch's latest commit, with its submodules.
Install dependenciesThe app's package manager installs what the app needs.
Build assetsThe app's build script runs, if it has one.
Run migrationsFor frameworks that have them, such as Laravel, Rails and Django.
Health checkCoresmith checks the new release has what it needs to start.
Go liveVisitors move to the new release, in one step.

Until the switch, visitors keep getting the release that's live. How a deploy goes live explains why.

After the switch, a page someone opened earlier keeps loading its scripts, styles and images from the release before, for apps whose files Coresmith serves: static sites, single-page apps and PHP apps. Static sites and single-page apps also tell browsers to check for the newest page, so every visit gets it.

To stop a deploy that's still running, choose Cancel in its log.

Read the deploy log

The log fills in as each command prints, so you can watch a long install or build as it goes. If you scroll up to read something earlier, the log stops following, and New output takes you back to the end.

Above the log:

  • Find in output highlights every match. Enter goes to the next one and Shift+Enter to the one before. While you're in the log, Ctrl+F (⌘F on a Mac) jumps to it.
  • First error takes you to the first line that looks like an error.
  • Wrap lines switches between wrapped lines and long lines you scroll sideways.
  • Copy and Download take the whole log. A download is named after the app and its release.

On a phone, the tools sit under the log and lines always wrap.

Deploy on every push

Auto deploy, a switch on the Setup card in the app's Deploys section, deploys every push to the app's branch. Apps you add from a repository start with it on. It waits for the app's first deploy, which you start once the app's variables are in place, and takes over from there. Turn it off there if you'd rather deploy by hand.

  • Pushes to GitHub, and to GitLab or Bitbucket once they're connected, reach Coresmith within seconds.
  • Apps added by Git URL are checked for new commits every five minutes.

Deploy from CI

Create an API token that can deploy apps, then call the deploy endpoint at the end of your CI run. Deploy from CI with an API token.

Roll back

On the app's page, Roll back goes back to the release before the live one. To pick another, choose All releases. Each release shows its commit's first line, who shipped it and when it went live, and Roll back to this switches to it. Coresmith asks first, builds nothing, and restarts the app's processes.

Releases in the navigation lists every app with its live release and the commit it came from, grouped by project, with a search box. An app running an older release is marked rolled back. On an app's releases, the arrows beside its name switch to another app's releases.

The last five releases stay on the server for rollbacks. A rollback doesn't undo migrations. What a rollback does.

When a deploy fails

The log says which step failed and why, and nothing changes for visitors. Coresmith emails everyone on the team who can see the app.

  • If the setup is wrong, such as the branch, folder or framework, choose Edit setup on the failed deploy, fix it and deploy again. Change an app.
  • If your own deploy script failed, the log shows the exit code it stopped with, and the page links back to the script. Use your own deploy script.
  • If a download failed, the page usually names the address and what went wrong, such as a 504 answer. Deploy again in a few minutes. If it keeps failing because the server can't reach the address or look it up, check the server's firewall and DNS settings.

Submodules

Submodules come with the release, at the commit the repository pins. Public submodules need nothing from you. A private submodule on GitHub works when the Coresmith GitHub app can read it. Any other private submodule stops the deploy and names it, so make it public or copy its files into the repository.