Skip to content
  • Ignite
  • Deploying

Deploying to Hop

Any application of any size, language or framework can be deployed to Hop. Deployments are Ignite's primary abstraction - containers run inside them.

However you create a new deployment on Hop, we'll internally create a "deployment config" which contains values such as the image, default resource allocations and environment variables for the deployment. When containers start, they read off of this deployment config. You can also provide custom overrides per container if needed, though this is rarely needed.

Deployment Methods

There are various ways to create and deploy new versions to existing deployments.

GitHub

Deploying to Hop from GitHub allows you to easily connect a GitHub repository to Ignite and have your project be automatically deployed when you push to your main branch.

To deploy from GitHub, we will use the Hop Console

Creating the Deployment

Select "Create Deployment" under the Ignite page.


If you're not sure what container type to pick, we recommend using Persistent.

Linking GitHub Account

You will now be prompted to link your GitHub account to Hop. Once connected, you can give Hop permission to all or individual repositories on your account.


Once permission is granted, you can select the repository to use and create the deployment. Once created, the first build for your application will start. You can view the build logs in realtime through the console - when it's built, it'll create a container to start serving your deployment.

Pushing Updates to your Deployment

To push an update to a GitHub deployment, simply git push to the main branch.

Hop will automatically detect this push and will begin building the new release. Once built, Hop will create a rollout: create containers for the new build and delete the old ones once the new ones are running.

Hop CLI

The easiest way to deploy a project directory is to use the Hop CLI.

Installation

Follow the install guide to install the CLI on your machine.

Deploying

Once installed and logged into the CLI, you can navigate to your project directory in your terminal and use hop deploy.

hop deploy

If this is the first time deploying this project to Hop, the CLI will walk you through creating a new deployment before finally building and deploying your project. You can also link existing deployments to directories.

Pushing Updates

If you need to deploy an update, just run hop deploy again and it'll take care of the rest, including smoothly rolling out new containers to guarantee uptime.

Rolling Back

If you accidentally pushed out a bad update, you can use the following command to roll back to the previous deployment.

hop oops

Linking a Project Directory to an Existing Deployment

If you've already created a deployment on Hop and want to link a project directory to that deployment, you can use:

hop link [deployment_id]

If a deployment ID isn't specified, then you will be given a list of your deployments to select from.

Last updated on September 21, 2022