{"id":13852658,"url":"https://github.com/anavarre/drucker","last_synced_at":"2025-07-13T06:30:47.656Z","repository":{"id":82047701,"uuid":"55682649","full_name":"anavarre/drucker","owner":"anavarre","description":"drucker: Drupal + Docker - Spin up Drupal, Lightning or BLT in seconds.","archived":true,"fork":false,"pushed_at":"2019-07-01T06:50:20.000Z","size":1477,"stargazers_count":26,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-22T07:37:02.051Z","etag":null,"topics":["ansible","cli","docker","drupal","lamp","orchestration"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anavarre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-07T09:40:15.000Z","updated_at":"2024-10-15T13:13:12.000Z","dependencies_parsed_at":"2023-03-07T11:30:20.102Z","dependency_job_id":null,"html_url":"https://github.com/anavarre/drucker","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/anavarre/drucker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anavarre%2Fdrucker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anavarre%2Fdrucker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anavarre%2Fdrucker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anavarre%2Fdrucker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anavarre","download_url":"https://codeload.github.com/anavarre/drucker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anavarre%2Fdrucker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265098887,"owners_count":23711217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","cli","docker","drupal","lamp","orchestration"],"created_at":"2024-08-04T22:01:30.964Z","updated_at":"2025-07-13T06:30:47.267Z","avatar_url":"https://github.com/anavarre.png","language":"Shell","readme":"![drucker Logo](drucker-logo.png)\n\n# drucker: Drupal + Docker\n\n[![Build Status](https://travis-ci.com/anavarre/drucker.svg?branch=master)](https://travis-ci.com/anavarre/drucker)\n\n[![drucker demo](https://asciinema.org/a/156876.png)](https://asciinema.org/a/156876)\n\n* [Introduction](#introduction)\n* [Requirements](#Requirements)\n  * [Software](#software)\n  * [Disk Space](#disk_space)\n  * [SSH](#ssh)\n* [Technology](#technology)\n* [Installation](#installation)\n  * [Configuring the hosts file](#hosts_file)\n  * [Creating or configuring the config file](#config_file)\n* [Usage](#usage)\n  * [Passwords](#passwords)\n* [Working with containers](#containers)\n  * [Get into a container](#connect_container)\n  * [Delete a container](#delete_container)\n  * [Delete an image](#delete_image)\n* [Troubleshooting](#troubleshooting)\n\n## \u003ca name=\"introduction\"\u003e\u003c/a\u003eIntroduction\n\n_drucker_ is an opinionated [Docker](https://www.docker.com)-based [Drupal](https://www.drupal.org) stack managed by [Ansible](https://www.ansible.com) for orchestration. It automates creating [Debian](https://www.debian.org) containers on which it will deploy a common web stack to run Drupal applications.\n\n_drucker_ runs on 5 containers:\n\n* `drucker_mirror` (`203.0.113.50`): APT mirror. Listens on port 3142. Allows for speedy reinstallation.\n* `drucker_edge` (`203.0.113.2`): Varnish listens on port 80 and sends traffic to the Apache backend via nginx on port 8080).\n* `drucker_web` (`203.0.113.10`): Apache listens on port 80 and receives traffic from nginx.\n* `drucker_db` (`203.0.113.12`): MySQL listens on port 3306 and allows the stack to act as a multi-tier environment.\n* `drucker_search` (`203.0.113.13`): Apache Solr listens on port 8983.\n\n## \u003ca name=\"requirements\"\u003e\u003c/a\u003eRequirements\n\n### \u003ca name=\"software\"\u003e\u003c/a\u003eSoftware\n\nYou need to have both [Docker](https://www.docker.com/) and [Ansible](https://www.ansible.com/) installed on your machine. Check with the below commands:\n\n```\n$ docker version\nDocker version 17.09.0-ce, build afdb6d4\n$ ansible --version\nansible 2.4.1.0\n```\n\n**Important**: Ansible 2.4 or later is required.\n\n_drucker_ is written in Python and requires several dependencies to run correctly. Install with:\n\n```\n$ pip3 install pycodestyle pylint colorful click --user\n```\n\n### \u003ca name=\"disk_space\"\u003e\u003c/a\u003eDisk space\n\nYou need to have approximately 6GB available.\n\n### \u003ca name=\"ssh\"\u003e\u003c/a\u003eSSH\n\nYou also need to [generate a SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/) if you don't have one already.\n\n## \u003ca name=\"technology\"\u003e\u003c/a\u003eTechnology\n\n_drucker_ ships with the following software stack:\n\n| Software            | Version               | Source            |\n| --------------------|-----------------------|-------------------|\n| Debian              | 9 (Stretch)           | [debian:stretch](https://hub.docker.com/_/debian/) (Docker Hub) |\n| Varnish             | 5.0.0 or higher       | APT               |\n| nginx               | 1.10.3 or higher      | APT               |\n| Apache              | 2.4.25 or higher      | APT               |\n| MariaDB             | 10.1.26 or higher     | APT               |\n| memcached           | 3.1.3                 | APT, via [ppa:ondrej/php](https://deb.sury.org/)       |\n| mcstat              | 1.1.0                 | [webbj74/mcstat](https://github.com/webbj74/mcstat) (Github)      |\n| phpMyAdmin          | 4.8.5                 | [phpMyAdmin](https://www.phpmyadmin.net/) (official site)      |\n| adminer             | 4.7.1                 | [vrana/adminer](https://github.com/vrana/adminer) (Github)      |\n| PHP-FPM             | 7.1 or 7.2            | APT, via [ppa:ondrej/php](https://deb.sury.org/)      |\n| APCu                | 5.1.17 or higher      | APT, via `php-apcu` ([ppa:ondrej/php](https://deb.sury.org/)) |\n| Coder               | 8.2.11                | [drupal/coder](https://packagist.org/packages/drupal/coder) (Packagist)      |\n| Code Sniffer        | 2.6.1                 | [squizlabs/PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (Github)              |\n| PHP-CS-Fixer        | 2.14.3                | [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (Github)              |\n| phpmd               | 2.6.0                 | [PHPMD](https://phpmd.org/) (official site)      |\n| phpstan             | 0.11.2 or higher      | [mglaman/phpstan-drupal](https://github.com/mglaman/phpstan-drupal) (Github)      |\n| PECL YAML           | 2.0.4                 | [php/pecl-file_formats-yaml](https://github.com/php/pecl-file_formats-yaml) (Github)              |\n| LibYAML             | 0.2.2                 | [PyYAML](http://pyyaml.org/) (official site)     |\n| Xdebug              | 2.7.2                 | [Xdebug](https://xdebug.org/) (official site)     |\n| Tideways Profiler   | 4.1.7                 | [tideways/php-profiler-extension](https://github.com/tideways/php-profiler-extension)  (Github)  |\n| phantomjs           | 2.1.1                 | [ariya/phantomjs](https://bitbucket.org/ariya/phantomjs/) (Bitbucket)     |\n| Drupal              | 8.7.x                 | [Drupal](https://www.drupal.org/project/drupal) (official site)     |\n| Drush               | ^9.0                  | [Drush](https://packagist.org/packages/drush/drush) (Packagist)      |\n| Drush Launcher      | 0.6.0                 | [Drush Launcher](https://github.com/drush-ops/drush-launcher) (Github)\n| Drupal Console      | ~1.0                  | [hechoendrupal/drupal-console-launcher](https://github.com/hechoendrupal/drupal-console-launcher) (Github)|\n| Composer            | 1.8.5                 | [Composer](https://getcomposer.org) (official site)     |\n| Apache Solr         | 7.6.0                 | [Solr](https://lucene.apache.org/solr/) (official site) |\n| OpenJDK             | 1.8.0_121 or higher   | APT, via debian-backports |\n| bash-git-prompt     | 2.7.1                 | [magicmonty/bash-git-prompt](https://github.com/magicmonty/bash-git-prompt) (Github)              |\n\n## \u003ca name=\"installation\"\u003e\u003c/a\u003eInstallation\n\n### \u003ca name=\"hosts_file\"\u003e\u003c/a\u003eConfiguring the hosts file\n\nAdd the below entries in your `/etc/hosts` file:\n\n```\n203.0.113.2    drucker.local phpmyadmin.local adminer.local lightning.local blt.local\n203.0.113.13   search.local\n203.0.113.50   mirror.local\n```\n\nThis will ensure you can access:\n\n* `drucker.local`: Drupal 8\n* `phpmyadmin.local`: phpMyAdmin (MySQL/MariaDB database management tool)\n* `adminer.local`: adminer (Database management tool in a single file)\n* `search.local:8983/solr/#/`: Apache Solr's dashboard\n\n**Recommended**: add the below bash alias entry in your `.bashrc` or `.bash_aliases` file:\n\n```\nalias drucker='path/to/drucker/drucker'\n```\n\nSource the file (or log out and log back in) to use the alias immediately. E.g.:\n\n```\n$ source ~/.bashrc\n```\n\nThis will allow you to invoke `drucker` from anywhere on your system.\n\n### \u003ca name=\"config_file\"\u003e\u003c/a\u003eCreating or configuring the config file\n\nAdd the below in your `config` file (under `$HOME/.ssh`) or create the file if it doesn't exist.\n\n```\nHost 203.0.113.99 203.0.113.2 203.0.113.10 203.0.113.12 203.0.113.13 203.0.113.50\n  StrictHostKeyChecking no\n  UserKnownHostsFile=/dev/null\n  LogLevel=error\n```\n\nThis will prevent SSH strict host key checking from getting in the way, since _drucker_ is for development purposes only.\n\n## \u003ca name=\"usage\"\u003e\u003c/a\u003eUsage\n\nSimply run `drucker` if you have a bash alias, or invoke the `drucker` script directly.\n\n```\n$ ./path/to/drucker\nEnter path to SSH public key [/home/\u003cusername\u003e/.ssh/id_rsa.pub]:\nWhere should we store drucker sites locally? [/var/www/html]:\nWhere should we store drucker databases locally? [/var/lib/mysql]:\n```\n\nOn the first run, `drucker` will prompt you with the path to your SSH public key, but will also try to map the `drucker` sites and databases paths to local directories of your choice, so that containers are made disposable by still preserving your data. You can override the default paths and this information will be stored in the `config` file going forward.\n\nTo prevent Git from prompting you with changes to the `config` file, you can exclude it from the Git tracking entirely with:\n\n```\n$ git update-index --assume-unchanged config\n```\n\nShould you want to stop doing so, just type:\n\n```\n$ git update-index --no-assume-unchanged config\n```\n\n### \u003ca name=\"passwords\"\u003e\u003c/a\u003ePasswords:\n\n* _drucker_ user password in containers: `drucker`\n* MySQL credentials: `root`/`root`\n* Drupal credentials: `admin`/`admin`\n\nFor more advanced `drucker` usage, you can pass several CLI parameters:\n\n```\n$ drucker -h\nusage: drucker [-h] [--drupal] [--lightning] [--blt] [--reinstall] [--dev]\n[--prod] [--import] [--delete] [--start] [--stop] [--restart]\n[--health] [--php7.3] [--php7.2] [--php7.1] [--list] [--tests]\n[--version]\n[app]\npositional arguments:\napp          Targets an arbitrary app\noptional arguments:\n-h, --help   show this help message and exit\n--drupal     Spins up a ready-to-use Drupal install\n--lightning  Spins up a ready-to-use Lightning install\n--blt        Spins up a ready-to-use BLT build\n--reinstall  Reinstalls Drupal or the currently installed distribution\n--dev        Configures the app for development use\n--prod       Configures the app for production use\n--import     Imports an app from the web container's import directory\n--delete     Deletes an arbitrary docroot\n--start      Starts all containers\n--stop       Stops all containers\n--restart    Restarts all containers\n--health     Runs a service healthcheck\n--php7.3     Sets the PHP version to 7.3\n--php7.2     Sets the PHP version to 7.2\n--php7.1     Sets the PHP version to 7.1\n--list       Lists all deployed apps\n--tests      Runs the Ansible test suite\n--version    Returns the drucker version\n```\n\nNotes:\n\n* Warning: when running automated tests, `'twig_debug'` should be set to FALSE.\n* The `app:import` parameter is a special beast. Please [read more about it in the wiki](https://github.com/anavarre/drucker/wiki/Importing-an-existing-site-to-drucker).\n\n## \u003ca name=\"containers\"\u003e\u003c/a\u003eWorking with containers\n\n### \u003ca name=\"connect_container\"\u003e\u003c/a\u003eGet into a container\n\nThe below command will get you in as the privileged user _drucker_\n\n```\n$ docker exec -u drucker -it \u003ccontainer_name\u003e bash\n```\n\nTo get in as _root_ instead, type:\n\n```\n$ docker exec -it \u003ccontainer_name\u003e bash\n```\n\nAs _root_, if you wish to log in as the _drucker_ username again (which is recommended and _is_ a sudoer), simply type:\n\n```\n$ su drucker\n```\n\n### \u003ca name=\"delete_container\"\u003e\u003c/a\u003eDelete a container\n\n```\n$ docker rm -f \u003ccontainer_name\u003e\n```\n\nWhen you run `drucker`, missing containers will be spun up from existing images.\n\n### \u003ca name=\"delete_image\"\u003e\u003c/a\u003eDelete an image\n\n```\n$ docker rmi \u003cdrucker:image\u003e\n```\n\nWhen you run `drucker`, missing images will be built.\n\n## \u003ca name=\"troubleshooting\"\u003e\u003c/a\u003eTroubleshooting\n\nIf for any reason an image would fail to be built or a container would be giving you troubles, go ahead and delete the offender! Running _drucker_ will always have your back and rebuild missing images and containers.\n\nFor more assistance, see [Troubleshooting drucker](https://github.com/anavarre/drucker/wiki/Troubleshooting-drucker) or file an issue.\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanavarre%2Fdrucker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanavarre%2Fdrucker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanavarre%2Fdrucker/lists"}