Skip to content
/ drubone Public

Universal solution for Drupal to manage configuration for multi-site and single-site docroot setups

License

Notifications You must be signed in to change notification settings

aroq/drubone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drubone - universal solution for Drupal to manage configuration for multi-site and single-site docroot setups

Features from the box:

  • Drush aliases generator for multi-site (and single-site) setups based on /sites directory using standard schema (you only need to configure servers IPs / SSH user / path to docroot on server to make local & remote aliases work for every site in setup, e.g. you can have @local.site1.en, @local.site1.fr, @dev.site1.en, @dev.site1.fr, @prod.site1.en, @prod.site1.fr aliases without the need to configure each site separately);

  • Multisite setup configuration in YAML format instead of lacking extended configuration capabilities default sites.php file, allowing to provide andy additional settings for each site/URL;

  • Customisable and manageable environment-specific (and any other custom specific parameters possible) settings files (environment indicators, standard caching settings, etc) in both YAML & PHP formats;

  • Drubone is highly configurable, so you can setup it in any specific way that will suit demands of your project or you can just use it from the box;

  • Every developer in the team can override some of the settings on his development PC only (useful for local development/debugging);

  • Works for both Drupal 7 & 8;

  • Some examples of using Drubone:

    • You can have URL-specific settings file (in PHP format) that will be included for specific URLs only (useful if you need specific settings for some of the pages/subdomains/domains) OR:

    • You can add URL-specific settings in YAML configuration file;

    • You can override any of the Drupal settings in YAML format in single file for every site in setup, or for every site in specific environment or use any other combination of server, environment, instance, etc;

Example of simple config file

infrastructure.yaml
---
servers:
  local:
    params:
  main:
    alias:
      remote-host: PLACEHOLDER.REMOTE.HOST
      remote-user: PLACEHOLDER.REMOTE.USER
      path-aliases:
        %dump-dir: /tmp

databases:
  default: &databases.default
    host: localhost
    password:
    port:
    driver: mysql
    prefix:
  local:
    <<: *databases.default
  dev: &databases.dev
    <<: *databases.default
    username: PLACEHOLDER.DEV.DATABASE.USER
    database: PLACEHOLDER.DEV.DATABASE.DB
    password: PLACEHOLDER.DEV.DATABASE.PASSWORD

environments:
  local:
    server: local
  dev:
    server: main
    alias:
      root: PLACEHOLDER:REMOTE:DEV:DOCROOT:PATH

projects:
  PLACEHOLDER:PROJECT1:
    params:
      path: PLACEHOLDER:PROJECT1:PATH
  PLACEHOLDER:PROJECT2:
    params:
      site_dir_name_prefix: PLACEHOLDER:PROJECT1:DIRNAME_PREFIX
      path: PLACEHOLDER:PROJECT2:PATH
    parent: PLACEHOLDER:PROJECT1
    instances:
      master:
        environments:
          local:
            databases:
              default:
                default: local
            sites:
              main:
                urls:
                  - PLACEHOLDER:LOCAL:HOST
          dev:
            databases:
              default:
                default: *databases.dev
            sites:
              main:
                urls:
                  - PLACEHOLDER:REMOTE:HOST

Example of local overridden settings file

local.infrastructure.yaml
---
servers:
  main:
    alias:
      remote-user: PLACEHOLDER.REMOTE.USER
  extra:
    alias:
      remote-user: PLACEHOLDER.REMOTE.USER

databases:
  local:
    database: PLACEHOLDER.REMOTE.DB
    username: PLACEHOLDER.REMOTE.USER
    password: PLACEHOLDER.REMOTE.PASSWORD

About

Universal solution for Drupal to manage configuration for multi-site and single-site docroot setups

Resources

License

Stars

Watchers

Forks

Packages

No packages published