Loading...


Related Products


Date Published: February 6, 2025

Lesson 3: Release the Kraken (code) - Deploying a Drupal 9 Application

In this lesson we will:

  1. Backup the production database.
  2. Deploy a tagged deployment artifact to the production environment.
 

Lesson Goal

In this next lesson we will deploy a production-ready tagged deployment artifact to a non-production environment on Acquia Cloud Platform.

To complete this lesson you will need:

  • A Drupal 9 application deployment artifact.
  • Access to an Acquia Cloud Platform subscription.
 

Lesson

    Backing up the database

    You should always backup your production database prior to a release, even if you're entirely confident in the code that you're releasing. Acquia Cloud Platform provides an interface for quickly creating environment specific backups.

     

    Deploying the codebase

    Next we will take your Git tag and deploy it to a non-Production environment first. In these examples we will use the Dev environment to first show how code can be deployed.

    Once you have tested your code from your non-Production deployment thoroughly you can then deploy to the Production environment.

    There are a couple of ways to do this:

    Option 1: Deploy Using Acquia Cloud Platform user interface

    You can use the Acquia Cloud Platform interface to deploy the Git tag to your environments.

    Deploying to non-Production environment

    This is an example using the Dev environment:

     

    Option 2: Deploy Using Drush

    Acquia Cloud Platform provides a set of Drush commands that allow you to interact with your application via the Command Line Interface (CLI). These commands are installed when you download your Drush aliases from Cloud Platform.

    You may use these to deploy your new tag to your environments. This can be particularly helpful if you would like to script your deployments.

    Deploying to non-Production environment

    drush @myapp.dev ac-code-path-deploy 1.0.0

    Deploying to Production environment

    drush @myapp.prod ac-code-path-deploy 1.0.0

     

    Production Mode

    If this is your first release on Acquia Cloud Platform, you should take this opportunity to put your site into production mode. In Production mode, you cannot copy your files or database to your Production environment. This protects you from possibly destroying your live application by overwriting the live Production files and databases.


     

    Proceed to
    Lesson 4: Post Code Deploy - Deploying a Drupal 9 Application

     

    Resources

    Did not find what you were looking for?

    If this content did not answer your questions, try searching or contacting our support team for further assistance.

    Back to Section navigation