Git Product home page Git Product logo

drupal-integrations's Introduction

pantheon-systems/drupal-integrations

Actively Maintained

Add this project to any Drupal distribution based on drupal/core-composer-scaffold to enable it for use on Pantheon.

This project enables the following Pantheon/Drupal integrations:

  • Injects the Pantheon database credentials for the Drupal site
  • Provides a default PHP version to use (7.3)
  • Enables HTTPS (in transitional mode) by default
  • Demonstrates how to turn on twig debugging on non-production Pantheon environments
  • Sets the path to:
    • Configuration import / export directory
    • Private files
    • Temporary files
    • Twig cache files
  • Establishes a secure, random hash salt for Drupal
  • Injects the Pantheon Service Provider (clears edge cache on cache rebuild, etc.)
  • Prevents the user from updating Drupal core with Drush
  • Configures the trusted host patterns to avoid a warning that is not applicable to Panthoen
  • Ignores large cache directories (e.g. node modules and bower components)

Enabling this project

This project must be enabled in the top-level composer.json file, or it will be ignored and will not perform any of its functions.

{
    ...
    "require": {
        "pantheon-systems/drupal-integrations": "^9"
    },
    ...
    "extra": {
        "drupal-scaffold": {
            "allowed-packages": [
                "pantheon-systems/drupal-integrations"
            ]
        }
    }
}

Versions

Use version "^8" for Drupal 8, and version "^9" for Drupal 9.

drupal-integrations's People

Contributors

artemkolotilkin avatar edwardangert avatar greg-1-anderson avatar hawkeyetwolf avatar kporras07 avatar morvans avatar rwagner00 avatar stevector avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drupal-integrations's Issues

Clarify (remove?) documentation related to pantheon.upstream.yml

The documentation for this project includes a section on disabling the scaffolding for pantheon.upstream.yml at https://github.com/pantheon-systems/drupal-integrations#special-instructions-for-upstreams

However, commit ba2317c removed the pantheon.upstream.yml from this package.

Assuming the intent is that this package is not responsible for scaffolding the pantheon.upstream.yml (or, per 7649ccf, the pantheon.yml), the documentation referenced above can be removed.

Using "../config" as config_sync_directory causes errors

After installing a Drupal on a Pantheon site using a custom distribution that is using the scaffold files from this repo, I see the following error on the Drupal status report page:

Errors found: Configuration sync directory

The directory ../config does not exist.

As well as the following error in the Drupal watchdog logs:

Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your ../config
directory which contains the following lines:

# Deny all requests from Apache 2.4+.
<IfModule mod_authz_core.c>
  Require all denied
</IfModule>

# Deny all requests from Apache 2.0-2.2.
<IfModule !mod_authz_core.c>
  Deny from all
</IfModule>

# Turn off all options we don't need.
Options -Indexes -ExecCGI -Includes -MultiViews

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
  # Override the handler again if we're run later in the evaluation list.
  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
</Files>

# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php7.c>
  php_flag engine off
</IfModule>

Question about initial.settings.php

Hi there!

We should be adding a config directory path to our settings.php files, so they work on local environments, correct? Or am I missing something in the latest versions of scaffolding files, and this isn't needed anymore?

(I was looking at https://github.com/pantheon-systems/drupal-integrations/blob/master/assets/initial.settings.php -- not saying you should necessarily add it there, mayyyyybe a code comment about it, but I understand if that's beyond the intended scope of this file -- I just wanted to see if I"m understanding things correctly.)

settings.pantheon.php should only set $settings['config_sync_directory'] if it is unset

Currently, the provided settings.pantheon.php overrides $settings['config_sync_directory'] no matter what.

We're using the BLT-provided "settings.php parts" that configure the config directory according to blt.yml config file before settings.pantheon.php gets included.

I'd suggest we just wrap this with a if (empty($settings['config_sync_directory'])).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.