This is the main OSU Drupal Distribution.
Acquia Pipelines will watch, build, and deploy versions when changes are detected.
- The develop branch will build and deploy to Acquia Cloud Development environment
- The master branch will build and deploy the Acquia Cloud Stage environment.
- For Acquia Cloud Production an Acquia Cloud administrator will need to manually deploy code from the Stage environment to Production.
- Start in the development branch
git pull && composer install- Check for updates
composer outdated drupal/\* - If you want to only check for packages that have minor version updates
composer outdated -m drupal/\*- To check for only updates that are required by this distribution's composer.json
composer outdated -D drupal/\*- Get updates
- To update a specific package only
composer update vendor/package- eg
composer update drupal/my_module - Update only core and it's dependencies
composer update drupal/core-composer-scaffold drupal/core-recommended drupal/core-dev --with-all-dependencies- Get all updates
composer update- Commit the changed composer.json and composer.lock and push
- Checkout the master branch
git pull && composer install- Merge the development branch in
- Commit and push
- Log into Acquia Cloud
- Navigate to the Acquia Cloud Application and deploy the latest changes to prod from the Stage environment.
- To create a new site in OSU Drupal for Acquia Cloud run
composer generate-site - This will ask you for the Production FQDN of the site to use and will create the sites' directory, populate the settings.php and the memcache file for acquia cloud.
- Follow the Post Install steps to Create the Database and Domains.
Drupal Recipes automate module installation & configuration by creating scripts that can install modules and themes and set up configuration on an existing Drupal installation.
To Use a Recipe navigate to the docroot folder for Drupal and run:
drush recipe ../recipes/<name of recipe folder>for examle, adding the OSU Tours Recipe:
drush recipe ../recipes/osu_toursRecipes can be chained together in the recipe.yaml.
You can build the container locally or pull form the registry.
We have a multi-stage Docker file to build. Most of the time the Development version will be used.
- For the development version of the container:
docker build --secret id=composer_auth,src=$HOME/.config/composer/auth.json --target=development --tag=osuwams/drupal:10-apache-dev .
- For the Production version
docker build --secret id=composer_auth,src=$HOME/.config/composer/auth.json --target=production --tag=osuwams/drupal:10-apache .
- DRUPAL_DBNAME
- The Database Name to use
- DRUPAL_DBUSER
- The Database User with permissions to that Database.
- DRUPAL_DBPASS
- The Password to the Database User.
- DRUPAL_DBHOST
- The Host name that the Database Server is running on
- Default: localhost
- The Host name that the Database Server is running on
- DRUPAL_DBPORT
- The Port the Database Server is running on
- Default: 3306
- The Port the Database Server is running on
- DRUPAL_MIGRATE_DBNAME
- The Database Name that contains the Source Data for the Migration
- DRUPAL_MIGRATE_DBUSER
- The Database user with permissions to that Database
- DRUPAL_MIGRATE_DBPASS
- The Password for the Database User
- DRUPAL_MIGRATE_DBHOST
- The Host name that the Database Server is running on
- Default: localhost
- The Host name that the Database Server is running on
- DRUPAL_MIGRATE_DBPORT
- The Port the Database Server is running on
- Default: 3306
- The Port the Database Server is running on
If you are running migrations locally after copying Down the database and files from the servers. Exec into the Database Container and create a new database and assign the same user to have access You can set the database name to what you will use in your Docker Compose environment variables.
For this example lets assume we want to migrate from drupal.oregonstate.edu and our Database user we used when we set up our Database container is 'drupal'.
CREATE DATABASE drupal_oregonstate_edu CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON `drupal_oregonstate_edu`.* TO `drupal`@`%`;Copy the Database file into the Drupal Container. This assumes the Drupal service is defined as drupal
docker compose cp drupal_oregonstate_edu.sql drupal:/var/www/Import the Migrate source Database into the newly created Database. This assumes the Database service is defined as database
mysql -u drupal -p -h database drupal_oregonstate_edu < drupal_oregonstate_edu.sqlTo place all files from the source drupal site for Files migration copy them to:
docker compose cp drupal.oregonstate.edu drupal:/var/www/html/docroot/sites/