Giter Site home page Giter Site logo

drupal-1's Introduction

drupal Cookbook

This cookbook installs a Drupal site on a LAMP stack.

Build Status

Usage

This cookbook has been designed to work with drupal-lamp.

Available deploy actions

Clean

Clean will pull down a fresh copy of your repo and install a site.

Import

This will import an existing database backup for your site. In addition to setting action = Import, you will need to place a sql file at /assets/[sitename]. So, if the site name is example and the file is backup.sql, it should be found at /assets/example/backup.sql.

You should specify the file name in your json at db_file.

Update

Will run:

drush updb -y; drush cc all

Using drush

After a site is installed:

$ vagrant ssh
$ cd /assets/[site name]
$ [run drush commands]

Configuration

default[:drupal][:server][:web_user] = "www-data" # linux web user
default[:drupal][:server][:web_group] = "www-data" # linux web group
default[:drupal][:server][:base] = "/srv/www" # web root base
default[:drupal][:server][:assets] = "/assets" # where all folders will be linked to for sharing purposes

default[:drupal][:drush][:revision] = "6.2.0" # drush revision
default[:drupal][:drush][:repository] = "https://github.com/drush-ops/drush.git"
default[:drupal][:drush][:dir] = "/opt/drush" # where to place drush
default[:drupal][:drush][:executable] = "/usr/bin/drush" # where to place drush executable

default[:drupal][:sites] = {
"example": {  # site name
  "active": true, # true or false
  "deploy": {
    "action": "", # see "available deploy actions" 
    "releases": 1 # number of git releases to store (in addition to the active release)
  },
  "drupal": {
    "version": 8.0, # drupal version 8.0, 7.0 or 6.0
    "install": {
      "install_configure_form.update_status_module": "'array(FALSE,FALSE)'",
      "--clean-url": 1 # enable clean urls on site install
    },
    "settings": {
      "profile": "standard", # if action is clean, this install profile will be installed
      "files": "sites/default/files", # location of the files directory
      "cookbook": "drupal", # the name of this cookbook
      "settings": {
        "default": {
          "location": "sites/default/settings.php" # location of the settings.php file
        },
        # use this section if you want to create a settings.php file from a template
        "example_template": { 
          "location": "sites/default/example.settings.php",
          "template": "example.settings.php.erb"
        },
        # use this section if you want to include an additional settings.php 
        #file onto the end of the default settings.php file
        "example_static": { 
          "location": "profiles/standard/standard.settings.php"
        }
      },
      "db_name": "example", # database name
      "db_host": "localhost", # database host
      "db_prefix": "", # database prefix
      "db_driver": "mysql", # database driver
      "db_file": "" # name of the database file that will be imported if action = import.
    }
  },
  "repository": {
    "host": "github.com",
    "uri": "https://github.com/drupal/drupal.git",
    "revision": "8.x" # branch, tag, or hash
  },
  # Apache configuration
  "web_app": {
    "80": { # port
      "server_name": "drupal.local",
      "rewrite_engine": "On",
      "docroot": "/srv/www/example/current",
      "server_name": "",
      "server_aliases": "",
      "rewrite_log": "",
      "rewrite_log_level": "",
      "directories": "",
      "rewrite": "",
      "log_level": "",
      "error_log": "",
      "custom_log": "",
      "transfer_log": "",
      "set_env_if": "",
      "redirect": ""
    },
    # include if you need https
    "443": { 
    	"server_name": "drupal.local",
      "rewrite_engine": "On",
      "docroot": "/srv/www/example/current",
      "server_name": "",
      "server_aliases": "",
      "rewrite_log": "",
      "rewrite_log_level": "",
      "directories": "",
      "rewrite": "",
      "log_level": "",
      "error_log": "",
      "custom_log": "",
      "transfer_log": "",
      "set_env_if": "",
      "redirect": "",
      "ssl": {
        "ssl_engine": "",
        "ssl_protocol": "",
        "ssl_cipher_suite": "",
        "ssl_certificate_file": "",
        "ssl_certificate_key_file": ""
      }
    }
  }
}

Contributing

We welcome contributed improvements and bug fixes via the usual workflow:

  1. Fork this repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request

drupal-1's People

Contributors

cyberswat avatar timodwhit avatar arknoll avatar rickmanelius avatar draenen avatar chrisolof avatar tannerjfco avatar

Watchers

Dane Cameron avatar

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.