Skip to content

Quick Start

This guide will take you through deploying your first application on Coherence. Specifically, it will show you how to:

  • Create a new application
  • Create a collection
  • Create an environment
  • Add a service
  • Connect your cloud account
  • Provision infrastructure
  • Build and deploy your application

After following this guide, you'll have a basic React application deployed to your cloud (AWS or GCP), hosted on a Coherence URL. It will look like this.

Demonstration of React example application


To follow along, you'll need:

Create an application

In Coherence, an app is an abstract space that defines your application. A Coherence app links to your GitHub repository, but also defines one or more collections (loosely equivalent to cloud accounts) and one or more environments (for example, staging and production), and contains CNC configuration to define how parts of your application fit together (for example, backend, frontend, and database).

On your Coherence dashboard, click New app in the top-left dropdown to open the New app dialog.

Create a new application on Coherence

  1. Give the app a name.
  2. Choose Amazon AWS or Google Cloud for the provider, depending on where you want your application to be deployed.
  3. Choose a deployment flavor for your application. If you're unsure which to pick, choose Cloud Run for Google Cloud or ECS for AWS.
  4. Click Continue.

Create a collection

A collection is loosely equivalent to a cloud account. For example, you might have separate clouds for staging and production, or for different customers.

Click Create collection.

Create a new collection on Coherence

Give your collection a name, like "development".

Create an environment

Each collection can have one or more environments. Environments can map to your collections but they do not have to. For example, you might have "Preview" and "Staging" environments in your "Development" collection, and a "Production" environment in your "Production" collection.

  1. Click New environment.
  2. Give your environment a name, like "staging".
  3. Choose "Staging" as the environment type. This is a long-lived environment that will use fewer resources than a "Production" environment.
  4. Press Create.

Create a new environment on Coherence

Add a service

An application can consist of multiple services (for example, "backend" and "frontend"), but we'll only use one for this demonstration.

Click on your environment, navigate to the Services tab, and click to create a new frontend.

Create a new environment on Coherence

The next step will build the cnc.yaml file that defines your application.

Create a new environment on Coherence

  1. Give your service a name, like "frontend".
  2. In the build command field, add the command that builds the production version of your site. For the React application we use in this demonstration, the build command is npm run build.
  3. Add the URL path your application will be served from. More complicated applications might have /backend and /frontend, but for our example, the entire application is served from the root URL, so enter /.
  4. Specify the folder containing your built application. For our React application, this is /dist.
  5. Select Repository to define where your source code can be found.
  6. Under Repo, next to "None connected yet", click Add one and paste in the link to your GitHub repository. You'll be prompted to install the Coherence GitHub application if you haven't already.
  7. Leave the Context field blank and enter "Dockerfile" if your Dockerfile is at the root of your repository.
  8. Choose the branch of your repository to build, often main.
  9. Click Create service.

If you navigate to the cnc.yml tab, you'll see that this configuration has been used to build the cnc.yml file.

Create a new environment on Coherence

Connect your cloud account

Next you'll be prompted to connect your cloud account. The steps for connecting to your cloud account will differ depending on which provider and flavor you selected when creating the application.

Navigate to the relevant page below and follow the guidance there.

Build and deploy your application

Once you've connected to a cloud and provisioned your infrastructure, you can build your application.

Start a new build

  1. Click New build.
  2. Choose the branch to build.
  3. Click Submit build.

Wait for the process to complete and then you should see your application deployed at the URL shown under Domains.