<commit_before># Drude (**Dru**pal **D**ocker **E**nvironment)
Docker and Docker Compose based environment for Drupal.

[![Circle CI](https://circleci.com/gh/blinkreaction/drude.svg?style=shield)](https://circleci.com/gh/blinkreaction/drude)

<a name="requirements"></a>
## Requirements

Docker is natively supported only on Linux.  
Mac and Windows users will need a tiny linux VM layer - [Boot2docker Vagrant Box](https://github.com/blinkreaction/boot2docker-vagrant)

### Mac and Windows

1. Get the [Boot2docker Vagrant Box](https://github.com/blinkreaction/boot2docker-vagrant) up and running.
2. Install [dsh](#dsh) tool (Drude Shell)

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-dsh.sh)
    ```

### Linux
1. [Docker](https://docs.docker.com/compose/install/#install-docker)
2. [Docker Compose](https://docs.docker.com/compose/install/#install-compose)
3. Install [dsh](#dsh) tool (Drude Shell)

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-dsh.sh)
    ```

<a name="setup"></a>
## Setup

Drude initial setup is done once per project (e.g. by a team lead).  
Once installed into the project repo, Drude can be used by anyone on the team.  
To use Drude each team member will need to meet the [requirements](#requirements) outlined above.

`docker-compose.yml` file and `.docker` folder are good indicators of Drude's presence in the project repo.

**If this is the first time Drude is being installed into the project, follow the instructions below.**  

The installation process is slightly different based on the OS.

### Mac

 1. Make sure your site's docroot is in `</path/to/project>/docroot`.
 2. Edit `settings.php` for the site (see [Drupal settings](#drupal-settings) below).
 3. cd `</path/to/project>` and run:

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)
    ```
    
 4. Start containers with `dsh up`

### Windows

 1. Make sure your site's docroot is in `</path/to/project>/docroot`.
 2. Edit `settings.php` for the site (see [Drupal settings](#drupal-settings) below).
 3. Open Git Bash shell and cd into `</path/to/project>`, then run:

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)
    ```
    
 4. Start and login into vagrant, cd into `</path/to/project>`:
 
    ```
    vagrant up
    vagrant ssh
    cd </path/to/project>
    ```

 5. Start containers with `dsh up`

### Linux

 1. Make sure your site's docroot is in `</path/to/project>/docroot`.
 2. Edit `settings.php` for the site (see [Drupal settings](#drupal-settings) below).
 3. cd `</path/to/project>` and run:

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)
    ```

 4. Start containers with `dsh up`

<a name="updates"></a>
## Updates

To update Drude run the following from the `</path/to/project>` folder:

    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)

Review the changes, revert any local overrides that were reset and commit into your project git repo.

Base images will be updated from time to time. Docker Compose does not automatically pull new image versions.
To get an up-to-date version of the entire stack do:

    docker-compose pull
    docker-compose up -d

<a name="drupal-settings"></a>
## Drupal settings

Below you will find instructions on configuring you Drupal project to work with Drude.
Some settings are required, others are optional or enahncements. Please review carefully.

**Required**
- [DB connection settings](.docker/docs/drupal-settings.md#db)
- [File permissions fix](.docker/docs/drupal-settings.md#file-permissions)

**Optional**
- [Memcache settings](.docker/docs/drupal-settings.md#memcache)

<a name="dsh"></a>
## Drude Shell (dsh)

Drude shell (dsh) is a console tool that simplifies that day-to-day work with Drude.
It provide a set of most commonly used commands and operations for controlling the Boot2docker VM, containers, running drush and other console commands inside the **cli** container.

See `dsh help` for a complete list.

`dsh` detects the environment it's launched in and will automatically start the boot2docker VM and launch containers as necessary.
It runs on Mac/Linux directly. On Windows `dsh` runs inside the boot2docker VM.

### Installation

    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-dsh.sh)

This will install a local dsh wrapper into `/usr/local/bin/dsh`.
The actual dsh script resides in each project individually (in `.docker/bin/dsh`) and is installed into the project along with Drude. The wrapper makes it possible to use `dsh` from anywhere in the project tree.

<a name="cli"></a>
## Console tools (cli)

**cli** container is ment to serv as a single console to access all necessary command line tools.
The **cli** console can launch with `dsh`:

    dsh bash

Tools available inside the **cli** container:

- php-cli, composer, drush7
- ruby, bundler
- node, npm, bower, grunt
- git, wget, zip, mysql-client
- python

<a name="instructions"></a>
## Instructions and tutorials

- [Running multiple projects](.docker/docs/multiple-projects.md)
- [Overriding default PHP/MySQL/etc. settings](.docker/docs/settings.md)
- [Public access](.docker/docs/public-access.md)
- [DB sandbox mode](.docker/docs/db-sandbox.md)
- [Using Behat](.docker/docs/behat.md)

## License

The MIT License (MIT)<commit_msg>Update docs path<commit_after># Drude (**Dru**pal **D**ocker **E**nvironment)
Docker and Docker Compose based environment for Drupal.

[![Circle CI](https://circleci.com/gh/blinkreaction/drude.svg?style=shield)](https://circleci.com/gh/blinkreaction/drude)

<a name="requirements"></a>
## Requirements

Docker is natively supported only on Linux.  
Mac and Windows users will need a tiny linux VM layer - [Boot2docker Vagrant Box](https://github.com/blinkreaction/boot2docker-vagrant)

### Mac and Windows

1. Get the [Boot2docker Vagrant Box](https://github.com/blinkreaction/boot2docker-vagrant) up and running.
2. Install [dsh](#dsh) tool (Drude Shell)

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-dsh.sh)
    ```

### Linux
1. [Docker](https://docs.docker.com/compose/install/#install-docker)
2. [Docker Compose](https://docs.docker.com/compose/install/#install-compose)
3. Install [dsh](#dsh) tool (Drude Shell)

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-dsh.sh)
    ```

<a name="setup"></a>
## Setup

Drude initial setup is done once per project (e.g. by a team lead).  
Once installed into the project repo, Drude can be used by anyone on the team.  
To use Drude each team member will need to meet the [requirements](#requirements) outlined above.

`docker-compose.yml` file and `.docker` folder are good indicators of Drude's presence in the project repo.

**If this is the first time Drude is being installed into the project, follow the instructions below.**  

The installation process is slightly different based on the OS.

### Mac

 1. Make sure your site's docroot is in `</path/to/project>/docroot`.
 2. Edit `settings.php` for the site (see [Drupal settings](#drupal-settings) below).
 3. cd `</path/to/project>` and run:

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)
    ```
    
 4. Start containers with `dsh up`

### Windows

 1. Make sure your site's docroot is in `</path/to/project>/docroot`.
 2. Edit `settings.php` for the site (see [Drupal settings](#drupal-settings) below).
 3. Open Git Bash shell and cd into `</path/to/project>`, then run:

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)
    ```
    
 4. Start and login into vagrant, cd into `</path/to/project>`:
 
    ```
    vagrant up
    vagrant ssh
    cd </path/to/project>
    ```

 5. Start containers with `dsh up`

### Linux

 1. Make sure your site's docroot is in `</path/to/project>/docroot`.
 2. Edit `settings.php` for the site (see [Drupal settings](#drupal-settings) below).
 3. cd `</path/to/project>` and run:

    ```
    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)
    ```

 4. Start containers with `dsh up`

<a name="updates"></a>
## Updates

To update Drude run the following from the `</path/to/project>` folder:

    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-drude.sh)

Review the changes, revert any local overrides that were reset and commit into your project git repo.

Base images will be updated from time to time. Docker Compose does not automatically pull new image versions.
To get an up-to-date version of the entire stack do:

    docker-compose pull
    docker-compose up -d

<a name="drupal-settings"></a>
## Drupal settings

Below you will find instructions on configuring you Drupal project to work with Drude.
Some settings are required, others are optional or enahncements. Please review carefully.

**Required**
- [DB connection settings](docs/drupal-settings.md#db)
- [File permissions fix](docs/drupal-settings.md#file-permissions)

**Optional**
- [Memcache settings](docs/drupal-settings.md#memcache)

<a name="dsh"></a>
## Drude Shell (dsh)

Drude shell (dsh) is a console tool that simplifies that day-to-day work with Drude.
It provide a set of most commonly used commands and operations for controlling the Boot2docker VM, containers, running drush and other console commands inside the **cli** container.

See `dsh help` for a complete list.

`dsh` detects the environment it's launched in and will automatically start the boot2docker VM and launch containers as necessary.
It runs on Mac/Linux directly. On Windows `dsh` runs inside the boot2docker VM.

### Installation

    bash <(curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/install-dsh.sh)

This will install a local dsh wrapper into `/usr/local/bin/dsh`.
The actual dsh script resides in each project individually (in `.docker/bin/dsh`) and is installed into the project along with Drude. The wrapper makes it possible to use `dsh` from anywhere in the project tree.

<a name="cli"></a>
## Console tools (cli)

**cli** container is ment to serv as a single console to access all necessary command line tools.
The **cli** console can launch with `dsh`:

    dsh bash

Tools available inside the **cli** container:

- php-cli, composer, drush7
- ruby, bundler
- node, npm, bower, grunt
- git, wget, zip, mysql-client
- python

<a name="instructions"></a>
## Instructions and tutorials

- [Running multiple projects](docs/multiple-projects.md)
- [Overriding default PHP/MySQL/etc. settings](docs/settings.md)
- [Public access](docs/public-access.md)
- [DB sandbox mode](docs/db-sandbox.md)
- [Using Behat](docs/behat.md)

## License

The MIT License (MIT)
{'fraction_non_alphanumeric': 0.12507851054284433, 'fraction_numerical': 0.004665769403319874, 'mean_word_length': 3.9914912673533363, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 49, 'https://': 26, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2381486', 'n_tokens_mistral': 3640, 'n_tokens_neox': 3417, 'n_words': 1211}