The Devilbox

![Devilbox](docs/img/banner.png) **[Usage](#usage)** | **[Community](#community)** | **[Features](#feature-overview)** | **[Intranet](#intranet-overview)** | **[Screenshots](#screenshots)** | **[Contributing](#contributing-)** | **[Logos](#logos)** | **[License](#license)** ![Devilbox](docs/_includes/figures/devilbox/devilbox-intranet-dash-all.png) [![Build Status](https://travis-ci.org/cytopia/devilbox.svg?branch=master)](https://travis-ci.org/cytopia/devilbox) [![Documentation Status](https://readthedocs.org/projects/devilbox/badge/?version=latest)](https://devilbox.readthedocs.io) ![Tag](https://img.shields.io/github/tag/cytopia/devilbox.svg) [![type](https://img.shields.io/badge/type-Docker-orange.svg)](https://www.docker.com/) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) The devilbox is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** and **MEAN** and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an **unlimited number of projects** for which vhosts, **SSL certificates** and **DNS records** are created automatically. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is pre-setup with mass virtual hosting. **Requirements** ![Linux](https://raw.githubusercontent.com/cytopia/icons/master/64x64/linux.png) ![Windows](https://raw.githubusercontent.com/cytopia/icons/master/64x64/windows.png) ![OSX](https://raw.githubusercontent.com/cytopia/icons/master/64x64/osx.png) * [Docker Engine 1.12.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21) * [Docker Compose 1.9.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21) ## Community Find documentation and help here

Documentation

Chat

Forum

devilbox.readthedocs.io gitter.im/devilbox coming soon
## Usage #### Quick start You are up and running in four simple steps: ```shell # Get the devilbox $ git clone https://github.com/cytopia/devilbox $ cd devilbox # Create docker-compose environment file $ cp env-example .env # Edit your configuration $ vim .env # Start all containers $ docker-compose up ``` #### Selective start The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command. ```shell $ docker-compose up httpd php mysql redis ``` ![Devilbox](docs/img/devilbox-dash-selective.png) #### Run different versions Every single attachable container comes with many different versions. In order to select the desired version for a container, simply edit the `.env` file and uncomment the version of choice. Any combination is possible.
Apache Nginx PHP MySQL MariaDB Percona PgSQL Redis Memcached MongoDB
2.2 stable 5.3 5.5 5.5 5.5 9.1 2.8 1.4.21 2.8
2.4 mainline 5.4 5.6 10.0 5.6 9.2 3.0 1.4.22 3.0
5.5 5.7 10.1 5.7 9.3 3.2 1.4.23 3.2
5.6 8.0 10.2 9.4 4.0 1.4.24 3.4
7.0 10.3 9.5 ... 3.5
7.1 9.6 1.5.2
7.2 10.0 latest
7.3
#### Enter the container You can also work directly inside the php container. Simply use the bundled scripts `shell.sh`. The `PS1` will automatically be populated with current chosen php version. ```shell # Enter as user devilbox (normal operation / development) host> ./shell.sh devilbox@php-7.0.19 in /shared/httpd $ ``` ```shell # Enter as root user (do root stuff) host> ./shell.sh devilbox@php-7.0.19 in /shared/httpd $ sudo su - root@php-7.0.19 in /shared/httpd $ ``` Your projects can be found in `/shared/httpd`. DNS records are automatically available inside the php container. Also every other service will be available on `127.0.0.1` inside the php container (tricky socat port-forwarding). #### Quick Video intro [![Devilbox setup and workflow](docs/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo) [![Devilbox email catch-all](docs/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY) ## Feature overview The devilbox has everything setup for you. The only thing you will have to install is [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders. #### Features
:star: Auto virtual hosts New virtual hosts are created automatically and instantly whenever you add a project directory. This is done internally via vhost-gen and watcherd.
:star: Automated SSL certificate generation SSL certificates are automatically created for each vhost and signed by the Devilbox CA.
:star: Unlimited vhosts Run as many projects as you need with a single instance of the devilbox.
:star: Custom vhosts You can overwrite and customise the default applied vhost configuration for every single vhost.
:star: Custom domains Choose whatever development domain you desire: *.loc, *.local, *.dev or use real domains as well: *.example.com
:star: Auto DNS An integraded BIND server is able to create DNS entries automatically for your chosen domains.
:star: Custom PHP config Overwrite any setting for PHP.
:star: Custom PHP modules Load custom PHP modules on the fly.
:star: Email catch-all All outgoing emails are catched and will be presented in the included intranet.
:star: Self-validation Projects and configuration options are validated and marked in the intranet.
:star: Xdebug Xdebug and a full blown PHP-FPM server is ready to serve.
:star: Many more See Documentation for all available features.
#### Batteries
:open_file_folder: phpMyAdmin
:open_file_folder: Adminer
:bar_chart: OpCache GUI
:email: Mail viewer
#### Tools The following tools will assist you on creating new projects easily as well as helping you check your code against guidelines.
:wrench: awesome-ci A set of tools for static code analysis:

file-cr, file-crlf, file-empty, file-nullbyte-char, file-trailing-newline, file-trailing-single-newline, file-trailing-space, file-utf8, file-utf8-bom, git-conflicts, git-ignored, inline-css, inline-js, regex-grep, regex-perl, syntax-bash, syntax-css, syntax-js, syntax-json, syntax-markdown, syntax-perl, syntax-php, syntax-python, syntax-ruby, syntax-scss, syntax-sh
:wrench: git flow git-flow is a Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
:wrench: json lint jsonlint is a command line linter for JSON files.
:wrench: laravel installer laravel is a command line tool that lets you easily install the Laravel framework.
:wrench: linuxbrew brew is a MacOS Homenbrew clone for Linux.
:wrench: markdownlint markdownlint is a markdown linter.
:wrench: mdl mdl is a markdown linter.
:wrench: phalcon devtools phalcon is a command line tool that lets you easily install the PhalconPHP framework.
:wrench: photon installer photon is a command line tool that lets you easily install the PhotonCMS.
:wrench: php code sniffer phpcs is a command line tool that tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
:wrench: php code beautifier phpcbf is a command line tool that automatically correct coding standard violations.
:wrench: scss-lint scss-lint is a css/scss linter.
:wrench: symfony installer symfony is a command line tool that lets you easily install the Symfony framework.
:wrench: tig tig is a text-mode interface for git.
:wrench: wp-cli wp is a command line tool that lets you easily install Wordpress.
:wrench: yamllint yamllint is a linter for yaml files.
Well-known and popular tools will be at your service as well: Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox #### Available PHP Modules The devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks. > *amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib* #### Custom PHP Modules You can also copy any custom modules into `mod/(php-fpm)-` and add a custom `*.ini` file to load them. #### Supported Frameworks As far as tested there are no limitations and you can use any Framework or CMS just as you would on your live environment. Below are a few examples of extensively tested Frameworks and CMS: [![CakePHP](docs/img/logo_fw/cake.png)](https://cakephp.org) [![CakePHP](docs/img/logo_fw/codeigniter.png)](https://www.codeigniter.com/) [![Drupal](docs/img/logo_fw/drupal.png)](https://www.drupal.org) [![Joomla](docs/img/logo_fw/joomla.png)](https://www.joomla.org) [![Laravel](docs/img/logo_fw/laravel.png)](https://laravel.com) [![Phalcon](docs/img/logo_fw/phalcon.png)](https://phalconphp.com) [![PhotonCMS](docs/img/logo_fw/photoncms.png)](https://www.photonics.com/) [![PrestaShop](docs/img/logo_fw/prestashop.png)](https://www.prestashop.com/en) [![Shopware](docs/img/logo_fw/shopware.png)](https://en.shopware.com/) [![Symfony](docs/img/logo_fw/symfony.png)](https://symfony.com) [![Typo3](docs/img/logo_fw/typo3.png)](https://typo3.org/) [![Wordpress](docs/img/logo_fw/wordpress.png)](https://wordpress.org) [![Yii](docs/img/logo_fw/yii.png)](http://www.yiiframework.com) [![Zend](docs/img/logo_fw/zend.png)](https://framework.zend.com) ## Intranet overview The devilbox comes with a pre-configured intranet on `http://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails. * **Virtual Host overview** (validates directories and DNS) * **Database overview** (MySQL, PgSQL, Redis, Memcache, ...) * **Email overview** * **Info pages** (Httpd, MySQL, PgSQL, Redis, Memcache, ...) * **[phpMyAdmin](https://www.phpmyadmin.net)** * **[Adminer](https://www.adminer.org)** * **[OpcacheGUI](https://github.com/PeeHaa/OpCacheGUI)** ## Screenshots A few examples of how the built-in intranet looks like.
## Contributing [![Open Source Helpers](https://www.codetriage.com/cytopia/devilbox/badges/users.svg)](https://www.codetriage.com/cytopia/devilbox) The Devilbox is still a young project with a long roadmap of features to come. Features are decided by you - **the community**, so any kind of contribution is welcome. To increase visibility and bug-free operation: * Star this project * Open up issues for bugs and feature requests * Clone this project and submit fixes or features Additionally you can [subscribe to devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox), read up on [CONTRIBUTING.md](CONTRIBUTING.md) and check the [ROADMAP](https://github.com/cytopia/devilbox/issues/23) about what is already planned for the near future. ## Logos Logos and banners can be found at **[devilbox/artwork](https://github.com/devilbox/artwork)**. Feel free to use or modify them by the terms of their license. ## License [MIT License](LICENSE.md) Copyright (c) 2016 [cytopia](https://github.com/cytopia)