Launch Environments

Environments allow you to deploy and host different versions of your project independently.

Launch allows you to set up multiple environments for a project, which you can configure to match your development style. Each environment is deployed and hosted on a unique URL. Auto-deploy is enabled by default for every environment.

A default environment is created with every project import. You can configure the environment as per your needs for further usage.

This document guides you through the process of creating, configuring, and deleting an environment in Launch.

Prerequisites

  1. Contentstack account
  2. Access to Launch for your organization

Create an Environment

  1. Click the project card to open your project from the Launch landing page.
  2. In the Environments screen, click the + New Environment button to add a new environment.

    Click to enlarge

  3. In the Create New Environment modal, fill in the following:
    1. If you choose GitHub to deploy your project, follow the steps below:
      1. Enter an environment name.
      2. Select a branch from the Git Branch dropdown.
      3. The fields in the Build and Output Settings section get auto-populated based on the detected framework. You can always change the Framework Preset and the build and output commands as per your requirement.
        Click to enlarge

        If you choose Other or Angular in the Framework Preset drop-down, a Server Command field displays as follows:

        Click to enlarge

        This field allows you to deploy the selected framework as Server-Side Rendered. Leaving the Server Command field as blank deploys the framework as CSR (Client-Side Rendered).

      4. In the Environment Variables field, perform the following:
      5. Click the Create button.

        You have successfully created an environment.

        Click to enlarge

    2. If you choose to upload a file to deploy your project, follow the steps below:
      1. Enter an environment name.
      2. Select a preset from the Framework Preset dropdown. The other fields in the Build and Output Settings section get auto-populated based on the selected preset. You can always change the Framework Preset and the build and output commands as per your requirement.
        Click to enlarge
      3. In the Environment Variables field, perform the following:
      4. The Upload a file field allows you to browse and upload a new file. Click browse to upload to upload a project file.
        You can also re-upload a different file after uploading a file. 
        Click to enlarge
      5. Click the Create button.

        You have successfully created an environment.

        Click to enlarge

Configure the Environments List Table

By default, the Auto Deploy and Created At columns are disabled in the Environments list table. To enable, follow the steps below:

  1. Click the Table Settings icon and then click Manage columns.
  2. Mark the Auto Deploy and Created At checkboxes to display the Auto Deploy and Created At columns respectively.

    Click to enlarge

A password-protected environment is represented with a lock icon next to it as shown in the screenshot below:

Click to enlarge

Configure an Environment

  • You can change the environment name and branch from Settings.
    1. In the Environments screen, go to the environment where your project is created, click the ellipses under Actions, and then click Settings to go to Environment Settings.
      Click to enlarge
    2. Edit the details in the Environment Name and Git Branch fields.
      Click to enlarge

      NoteWhen you import a project by uploading a file, the Git Branch field in the General settings is not available.

    3. Click the Save Environment Details button.
  • You can configure environments to use deploy hooks, custom domains, and environment variables.
  • You can control the deployment behavior by toggling auto-deployments.
  • You can protect an environment using a password.

NoteThe auto-deployment feature is unavailable when you import a project by uploading a file.

Delete an Environment

Launch allows you to delete an environment that you no longer require.

Follow the steps below to delete an environment:

  1. In the Environments screen, go to the environment you want to delete, click the ellipses under Actions, and then click Delete.

    Click to enlarge

    A modal is displayed asking for confirmation to delete the environment.

  2. Enter DELETE and then click the Yes, Delete button.

    Click to enlarge

    WarningThis action will remove all domains associated with this environment. After the removal, your Contentstack domains will still be available for use.

Alternatively, you can follow the steps below to delete an environment:

  1. In the Environments screen, go to the environment you want to delete, click the ellipses under Actions, and then click Settings to go to Environment Settings.
    Click to enlarge
  2. In Settings > Environments > General > Delete Environment, click the Delete Environment button.

    You will see a warning message displayed above the button.

    Click to enlarge

    A modal is displayed asking for confirmation to delete the environment.

  3. Enter DELETE and then click the Yes, Delete button.

    Click to enlarge

    NoteOn deleting an environment, its corresponding deployments also get deleted.