Setup Open Social Drupal 8 distribution on Pantheon
On your local install Open Social with composer
composer create-project goalgorilla/social_template:dev-master DIR --no-interaction
After the installation is done navigate to the folder.
From kalamuna drupal project merge .circleci folder, assets folder.
Update composer.json file to include parts of Kalamuna Drupal project. It should look something like that:
{
"name": "goalgorilla/social_template",
"description": "Social project template for composer based Open Social projects.",
"type": "project",
"license": "GPL-2.0+",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"composer/installers": "^1.0",
"drupal-composer/drupal-scaffold": "^2.6.1",
"cweagans/composer-patches": "^1.0",
"goalgorilla/open_social": "~8.0",
"php": "^7.2",
"monolog/monolog": "^1.17",
"pantheon-systems/drupal-integrations": "^8.0",
"vlucas/phpdotenv": "^4.1",
"webflo/drupal-finder": "^1.2",
"zaporylie/composer-drupal-optimizations": "^1.1"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"require-dev": {
"drupal/core-dev": "^8.8",
"drupal/devel": "^2.1",
"drupal/stage_file_proxy": "^1.0"
},
"conflict": {
"drupal/drupal": "*"
},
"prefer-stable": true,
"config": {
"sort-packages": true
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php"
],
"files": ["load.environment.php"]
},
"scripts": {
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
]
},
"extra": {
"enable-patching": true,
"drupal-scaffold": {
"allowed-packages": [
"pantheon-systems/drupal-integrations"
],
"locations": {
"web-root": "web/"
},
"file-mapping": {
"[web-root]/profiles/drupal_project/drupal_project.info.yml": {
"path": "assets/install_profile.info.yml"
},
"[web-root]/profiles/drupal_project/drupal_project.install": {
"path": "assets/install_profile.install"
},
"[web-root]/sites/development.services.yml": {
"path": "assets/default.development.services.yml",
"overwrite": false
},
"[web-root]/sites/default/settings.local.php": {
"path": "assets/default.settings.local.php",
"overwrite": false
},
"[web-root]/robots.txt": {
"path": "web/core/assets/scaffold/files/robots.txt",
"overwrite": false
},
"[web-root]/sites/default/settings.php": {
"append": "assets/append.settings.php"
}
},
"gitignore": false
},
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/contrib/{$name}": ["type:drupal-drush"]
}
}
}
In your codebase rename html directory to be web directory.
copy pantheon.yml, pantheon.settings.php, load.environment, scripts, .lando.yml files from Drupal project.
Update .gitignore to be something like that
# Ignore directories generated by Composer
/drush/contrib/
/vendor/
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/
# Ignore core files created by Drupal scaffold.
/web/.csslintrc
/web/.eslintignore
/web/.eslintrc.json
/web/.ht.router.php
/web/sites/example.settings.local.php
/web/sites/default/default.services.yml
/web/sites/default/default.settings.php
/web/sites/example.sites.php
# Ignore compiled theme files.
/web/themes/custom/*/dist
# Ignore node modules.
/node_modules
# Ignore local development settings.
/web/sites/*/settings.local.php
/web/sites/development.services.yml
# Ignore Drupal's file directory
/web/sites/*/files/
# Ignore SimpleTest multi-site environment.
/web/sites/simpletest
# Ignore files generated by PhpStorm
/.idea/
# Ignore .env files as they are personal
/.env
/.editorconfig
/.gitattributes
# Ignore the drush-lock-update file created by the drupal-integrations scaffold.
.drush-lock-update
# Prevent non-code files from being committed to the repository.
*.sql
*.tar
*.gz
*.sh
*.txt
*.csv
*.pdf
# Don't ignore robots.txt along with other text files.
!/web/robots.txt
# We do not need any .htaccess files that drupal may create.
.htaccess
# Ignore other files created by operating systems.
.DS_Store
Thumbs.db
Update .gitignore-deploy to match one from Kalamuna Drupal project.
Note that we cannot exclude web directory and core completely since core is not required it is brought in by the Open Social distribution.
run the following command
composer install
Follow instructions from Kalamuna Drupal project to setup Pantheon and CircleCI.
Once this is done - deploy to gitHub and see your CI goes through and deploys to Pantheon.
Once done, install site on Pantheon through UI.