Skip to content

mikemadison13/multisite

Repository files navigation

My Project

This repository consists of the multisite.

Getting Started

This project is based on BLT 12.x with Lando local env, an open-source project template and tool that enables building, testing, and deploying Drupal installations following Acquia Professional Services best practices. While this is one of many methodologies, it is our recommended methodology.

  1. Review the Required / Recommended Skills for working with a BLT project.
  2. Ensure that your computer meets the minimum installation requirements (and then install the required applications). See the System Requirements.

If Starting From Scratch

  1. Download the latest version of Drupal
$ composer create-project --no-interaction acquia/drupal-recommended-project multisite
  1. Confirm BLT is added as a composer dependency
$ composer require acquia/blt:^12.0 --no-update
  1. Add the blt-lando plugin
$ composer require mikemadison13/blt-lando
  1. Run composer update
$ composer update
  1. Setup your container settings by modifying your .lando.yml file.
$ blt recipes:vm:lando

Working from an existing project

  1. Request access to organization that owns the project repo in GitHub (if needed).
  2. Fork the project repository in GitHub.
  3. Request access to the Acquia Cloud Environment for your project (if needed).
  4. Setup a SSH key that can be used for GitHub and the Acquia Cloud (you CAN use the same key).
    1. Setup GitHub SSH Keys
    2. Setup Acquia Cloud SSH Keys
  5. Clone your forked repository. By default, Git names this "origin" on your local.
$ git clone git@github.com:<account>/multisite.git
  1. To ensure that upstream changes to the parent repository may be tracked, add the upstream locally as well.
$ git remote add upstream git@github.com:acquia-pso/multisite.git
  1. Install Composer dependencies. After you have forked, cloned the project and setup your blt.yml file install Composer Dependencies. (Warning: this can take some time based on internet speeds.)
$ composer install
  1. Setup Lando. Setup the container by modifying your .lando.yml with the configuration from this repositories configuration files.
$ lando start
  1. Setup a local Drupal site with an empty database. Use BLT to setup the site with configuration. If it is a multisite you can identify a specific site.
$ lando blt setup

or

$ lando blt setup --site=[sitename]
  1. Log into your site with drush. Access the site and do necessary work at #LOCAL_DEV_URL by running the following commands.
$ cd web
$ lando drush uli

Other Local Setup Steps

  1. Set up frontend build and theme. By default BLT sets up a site with the lightning profile and a cog base theme. You can choose your own profile before setup in the blt.yml file. If you do choose to use cog, see Cog's documentation for installation. See BLT's Frontend docs to see how to automate the theme requirements and frontend tests. After the initial theme setup you can configure blt/blt.yml to install and configure your frontend dependencies with blt setup.

  2. Pull Files locally. Use BLT to pull all files down from your Cloud environment.

$ lando blt drupal:sync:files
  1. Sync the Cloud Database. If you have an existing database you can use BLT to pull down the database from your Cloud environment.
$ lando blt sync

To start developing every time

  1. Pull from the github repository
git pull upstream develop
  1. Create a new feature branch from develop
git checkout -b JIRA-000-feature-branch
  1. Install Composer dependencies. After you have forked, cloned the project and setup your blt.yml file install Composer Dependencies. (Warning: this can take some time based on internet speeds.)
$ composer install
  1. Setup container
$ lando start
  1. Setup a local Drupal site with an empty database. The blt-cohesion composer package will run all necessary site studio commands. Use BLT to setup the site with configuration.
$ lando blt setup

or If it is a multisite you can identify a specific site.

$ lando blt setup --site=multisite
  1. Log into your site with drush. Access the site and do necessary work at #LOCAL_DEV_URL by running the following commands.
$ cd docroot
$ lando drush uli

To Create a Pull Request.

  1. After you make changes inside your local drupal site. Export your configuration from the database to your configuration. Export your drupal config changes if you have them.
$ lando drush cex

To export Site studio configuration to your site studio package run the following command.

$ lando drush sync:export
  1. commit your changes and push your changes to your origin repository.
$ git status
$ git add -p
$ git commit -m"multisite-000: Committing new changes to site."
$ git push --set-upstream origin multisite-000-new-site-change
  1. Navigate to Github and open a pull request against the upstream. Assign a person on your team to review.

Resources

Additional BLT documentation may be useful. You may also access a list of BLT commands by running this:

$ blt

Note the following properties of this project:

Working With a BLT Project

BLT projects are designed to instill software development best practices (including git workflows).
Our BLT Developer documentation includes an example workflow.

Important Configuration Files

BLT uses a number of configuration (.yml or .json) files to define and customize behaviors. Some examples of these are:

  • blt/blt.yml (formerly blt/project.yml prior to BLT 9.x)
  • blt/local.blt.yml (local only specific blt configuration)
  • landio.yml (Lando configuration)
  • drush/sites (contains Drush aliases for this project)
  • composer.json (includes required components, including Drupal Modules, for this project)

About

An example Drupal 9, BLT 13, and Multisite Codebase

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published