This page describes how to develop a Drupal site in your local system or Cloud IDE by using Acquia CMS. It also explains how to deploy the site to environments running on Cloud Next technologies.
To deploy code changes from your local system to Cloud Next, you must install Acquia CLI. For more information, see Acquia CLI installation. However, if you are using Cloud IDE, you do not need to install Acquia CLI as it is pre-installed in Cloud IDE.
After you install Acquia CMS by using one of the available starter kits, you can start developing your Drupal site.
To develop your Acquia CMS-flavored Drupal site from your local system or Cloud IDE:
To configure the settings.php
file:
Make the settings.php
writable.
Remove the following code snippet:
$databases['default']['default'] = array (
'database' => 'drupal',
'username' => 'drupal',
'password' => 'drupal',
'prefix' => '',
'host' => '127.0.0.1',
'port' => '3306',
'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
'driver' => 'mysql',
'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
);
Add the following require line:
if (file_exists('/var/www/site-php')) {
require '/var/www/site-php/eejohngalvin/eejohngalvin-settings.inc';
}
You can get this require line from the Cloud Platform user interface.
To set up the Cloud Next Git remote:
Run the following commands sequentially:
git init
git remote add origin <remote_URL>
Note
You can skip the git init
command in Cloud IDE.
To obtain the remote URL in the Cloud Platform user interface, click View Git Information.
To commit code to the branch:
Run the following commands sequentially:
git checkout -b branch
git add .
git commit -m "Initial Commit"
git push origin branch
After your Drupal site is developed, you can deploy the site to Cloud Next by completing the following tasks:
To push the artifact to Cloud Next:
Run the following command:
acli push:artifact --destination-git-branch=main-build
To push the database to Cloud Next:
Run the following command:
acli push:db
To push files to Cloud Next:
Run the following command:
acli push:files
To deploy the branch to the environment:
Switch the code with the artifact branch.