forked from audrey/drupal10
Reviewed-on: audrey/drupal10#1
Composer template for Drupal projects
Based on Drupal Composer
What does the template do?
- Drupal will be installed in the
webdirectory. - Generated composer autoloader
vendor/autoload.phpis used instead ofweb/vendor/autoload.phpprovided by Drupal core. - Modules (packages of type
drupal-module) will be placed inweb/modules/contribdirectory. - Themes (packages of type
drupal-theme) will be placed inweb/themes/contribdirectory. - Profiles (packages of type
drupal-profile) will be placed inweb/profiles/contribdirectory. - Creates default writable versions of
settings.phpandservices.yml. - Creates
web/sites/default/filesdirectory. - Drush is installed for use as
vendor/bin/drush. - Provides an example of the
.envfile.
Usage
Manual install instructions. Production deployments should be handled by the CI/CD runner automatically.
Instructions for this to come later one I've actually built the flow.
Note
The Cram-A-Lot website does not currently support containerized deployments.
- Clone the repository to the destination.
- Install Dependencies
composer install
- Configure your webserver's home dir to
{PROJECT_DIR}/web
Setup for development
It is recommended to install DDEV.
Review the official Drupal Local Development Guide for more information.
Prerequisites
You must have WSL2 set up on your system with docker installed.
Install DDEV
# Add DDEV’s GPG key to your keyring
sudo sh -c 'echo ""'
sudo apt-get update && sudo apt-get install -y curl
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://pkg.ddev.com/apt/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/ddev.gpg > /dev/null
sudo chmod a+r /etc/apt/keyrings/ddev.gpg
# Add DDEV releases to your package repository
sudo sh -c 'echo ""'
echo "deb [signed-by=/etc/apt/keyrings/ddev.gpg] https://pkg.ddev.com/apt/ * *" | sudo tee /etc/apt/sources.list.d/ddev.list >/dev/null
# Update package information and install DDEV
sudo sh -c 'echo ""'
sudo apt-get update && sudo apt-get install -y ddev
# One-time initialization of mkcert
mkcert -install
Starting the Dev Container
- Clone this project, then open a terminal session to the new directory.
- Run
ddev config --project-type drupal --docroot web - Run
ddev composer installthenddev start. Watch for the console to output a URL to access the webserver
Contributing
If you're using this as a basis for a website, then please fork it first or change the origin after cloning.
Commits to the #main are blocked. Pull Requests will be rejected without good reason.
Description
Languages
PHP
100%