Usage | Available Container | Community | Features | Intranet | Screenshots | Contributing | Logos | License
Support for valid https out of the box.
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. Reverse proxies per project are supported to ensure listening server such as NodeJS can also be reached. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.
Furthermore, the Devilbox provides an identical and reproducible development environment for different host operating systems.
Requirements
Important
Before updating the Devilbox ensure to always check for breaking changes until the stable release is out:
The Devilbox ships the following pre-configured Docker container in any available version.
Web server | SQL | NoSQL | Queue & Search | Misc |
---|---|---|---|---|
Apache | MariaDB | Memcached | RabbitMQ | Bind |
Nginx | MySQL | MongoDB | Solr | Blackfire |
PerconaDB | Redis | MailHog | ||
PostgreSQL | PHP |
Documentation: Available Container
The Devilbox has a lot of features reaching from a simple single-user development environment that works out of the box up to a shared development infrastructure for a corporate network.
In order to be aware about all that features, ensure to have skimmed over the documentation, so you know what can be done and how that might simplify your every-day life. If you ever run into any unforseen issues, feel free to join the chat or visit the forums and get community support quickly.
devilbox.readthedocs.io | gitter.im/devilbox | devilbox.discourse.group |
Linux and MacOS | Windows |
---|---|
# Get the Devilbox $ git clone https://github.com/cytopia/devilbox # Create docker-compose environment file $ cd devilbox $ cp env-example .env # Edit your configuration $ vim .env # Start all container $ docker-compose up |
1. Clone https://github.com/cytopia/devilbox to C:\devilbox with Git for Windows2. Copy C:\devilbox\env-example to C:\devilbox\.env 3. Edit C:\devilbox\.env 4. Open a terminal on Windows and type: # Start all container C:\devilbox> docker-compose up |
Documentation: Install the Devilbox | Start the Devilbox | .env file
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.
$ docker-compose up httpd php mysql redis
Documentation: Start only some container
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.2[1] | 5.5 | 5.5 | 5.5 | 9.0 | 2.8 | 1.4 | 2.8 |
2.4 | mainline | 5.3 | 5.6 | 10.0 | 5.6 | 9.1 | 3.0 | 1.5 | 3.0 |
5.4 | 5.7 | 10.1 | 5.7 | 9.2 | 3.2 | latest | 3.2 | ||
5.5 | 8.0 | 10.2 | 9.3 | 4.0 | 3.4 | ||||
5.6 | 10.3 | 9.4 | 5.0 | 3.6 | |||||
7.0 | 9.5 | latest | 4.0 | ||||||
7.1 | 9.6 | latest | |||||||
7.2 | ... | ||||||||
7.3 | 11.1 | ||||||||
7.4[2] | latest |
[1] PHP 5.2 is available to use, but it is not officially supported. The Devilbox intranet does not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk.
[2] PHP 7.4 is the upcoming unreleased version of PHP, which is directly built out of their master branch. It will improve every day as the image is rebuilt every day from the latest commits.
Documentation: Change container versions
Additionally to the default stack, there are a variety of other services that can be easily enabled and started.
Blackfire | MailHog | RabbitMQ | Solr |
---|---|---|---|
1.8 | v1.0.0 | 3.6 | 5 |
... | latest | 3.7 | 6 |
1.18.0 | latest | 7 | |
latest | latest |
Documentation: Enable custom container
You can also work directly inside the php container. Simply use the bundled scripts shell.sh
(or shell.bat
for Windows).
The PS1
will automatically be populated with current chosen php version.
Navigate the the Devilbox directory and type the below listed command:
Linux and MacOS | Windows |
---|---|
host> ./shell.sh [email protected] in /shared/httpd $ |
C:\devilbox> shell.bat [email protected] 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).
Documentation: Work inside the PHP container | Directory overview
The Devilbox has everything setup for you. The only thing you will have to install is Docker and Docker Compose. Virtual hosts and DNS entries will be created automatically, just by adding new project folders.
Documentation: Devilbox Prerequisites
β HTTP/2 support | All HTTPS connections will offer HTTP/2 as the default protocol, except for Apache 2.2 which does not support it. |
β 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. |
β Automated SSL certs | Valid SSL certificates for HTTPS are automatically created for each vhost and signed by the Devilbox CA. |
β Unlimited vhosts | Run as many projects as you need with a single instance of the Devilbox. |
β Custom vhosts | You can overwrite and customise the default applied vhost configuration for every single vhost. |
β Reverse proxy | Have your NodeJS application served with a nice domain name and valid HTTPS. |
β Custom domains | Choose whatever development domain you desire: *.loc , *.dev or use real domains as well: *.example.com |
β Auto DNS | An integrated BIND server is able to create DNS entries automatically for your chosen domains. |
β Auto start scripts | Custom startup scripts can be provided for all PHP container equally and also differently per PHP version to install custom software or automatically startup up your required tools. |
β Custom PHP config | Overwrite any setting for PHP. |
β Custom PHP modules | Load custom PHP modules on the fly. |
β Email catch-all | All outgoing emails are catched and will be presented in the included intranet. |
β Self-validation | Projects and configuration options are validated and marked in the intranet. |
β Xdebug | Xdebug and a full blown PHP-FPM server is ready to serve. |
β Many more | See Documentation for all available features. |
Documentation: Setup Auto DNS | Setup valid HTTPS | Configure Xdebug | Customize PHP
The following batteries are available in the Devilbox intranet by default:
Adminer | phpMyAdmin | phpPgAdmin | phpRedMin | OpCache GUI | Mail viewer |
Documentation: Devilbox Intranet
The following tools will assist you on creating new projects easily as well as helping you check your code against guidelines.
π§ 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 |
π§ git flow | git-flow is a Git extensions to provide high-level repository operations for Vincent Driessen's branching model. |
π§ json lint | jsonlint is a command line linter for JSON files. |
π§ laravel installer | laravel is a command line tool that lets you easily install the Laravel framework. |
π§ linkcheck | linkcheck is a command line tool that searches for URLs in files (optionally limited by extension) and validates their HTTP status code. |
π§ linuxbrew | brew is a MacOS Homenbrew clone for Linux. |
π§ markdownlint | markdownlint is a markdown linter. |
π§ mdl | mdl is a markdown linter. |
π§ phalcon devtools | phalcon is a command line tool that lets you easily install the PhalconPHP framework. |
π§ photon installer | photon is a command line tool that lets you easily install the PhotonCMS. |
π§ 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. |
π§ php code beautifier | phpcbf is a command line tool that automatically correct coding standard violations. |
π§ php cs fixer | php-cs-fixer is a tool to automatically fix PHP Coding Standards issues. |
π§ pm2 | pm2 is Node.js Production Process Manager with a built-in Load Balancer. |
π§ scss-lint | scss-lint is a css/scss linter. |
π§ symfony installer | symfony is a command line tool that lets you easily install the Symfony framework. |
π§ tig | tig is a text-mode interface for git. |
π§ wp-cli | wp is a command line tool that lets you easily install WordPress. |
π§ yamllint | yamllint is a linter for yaml files. |
Well-known and popular tools will be at your service as well:
Documentation: Available Tools
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.
- Core enabled (cannot be disabled): β
- Enabled (can be disabled): πΈ
- Available, but disabled (can be enabled): d
Modules | PHP 5.2 | PHP 5.3 | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 |
---|---|---|---|---|---|---|---|---|---|---|
amqp | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | ||
apc | πΈ | πΈ | πΈ | πΈ | ||||||
apcu | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | ||
bcmath | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
blackfire | d | d | d | d | d | |||||
bz2 | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
calendar | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
Core | β | β | β | β | β | β | β | β | β | |
ctype | β | β | β | β | β | β | β | β | β | β |
curl | β | β | β | β | β | β | β | β | β | β |
date | β | β | β | β | β | β | β | β | β | β |
dba | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
dom | β | β | β | β | β | β | β | β | β | β |
enchant | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
ereg | β | β | β | β | ||||||
exif | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
FFI | πΈ | |||||||||
fileinfo | πΈ | β | β | β | β | β | β | β | β | β |
filter | β | β | β | β | β | β | β | β | β | β |
ftp | πΈ | πΈ | πΈ | β | β | β | β | β | β | β |
gd | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
gettext | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
gmp | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | |
hash | β | β | β | β | β | β | β | β | β | β |
iconv | β | β | β | β | β | β | β | β | β | β |
igbinary | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
imagick | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | ||
imap | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | |
interbase | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
intl | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
ioncube | d | d | d | d | d | d | d | d | ||
json | β | β | β | β | β | β | β | β | β | β |
ldap | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
libxml | β | β | β | β | β | β | β | β | β | β |
mbstring | β | πΈ | πΈ | β | β | β | β | β | β | β |
mcrypt | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | ||
memcache | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | ||
memcached | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
mhash | β | |||||||||
mongo | πΈ | πΈ | πΈ | πΈ | πΈ | |||||
mongodb | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | |
msgpack | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | |
mysql | β | β | πΈ | πΈ | πΈ | |||||
mysqli | β | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
mysqlnd | β | β | β | β | β | β | β | β | β | |
oci8 | d | d | d | d | d | d | d | d | d | |
openssl | β | β | β | β | β | β | β | β | β | β |
pcntl | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
pcre | β | β | β | β | β | β | β | β | β | β |
PDO | β | β | β | β | β | β | β | β | β | β |
pdo_dblib | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
PDO_Firebird | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
pdo_mysql | β | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
PDO_OCI | d | d | d | d | d | |||||
pdo_pgsql | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
pdo_sqlite | β | β | β | β | β | β | β | β | β | β |
pdo_sqlsrv | d | d | d | d | ||||||
pgsql | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
phalcon | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | ||
Phar | πΈ | β | β | β | β | β | β | β | β | β |
posix | β | β | β | β | β | β | β | β | β | β |
pspell | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
rdkafka | d | d | d | d | d | d | d | d | d | |
readline | β | β | β | β | β | β | β | β | β | β |
recode | πΈ | β | β | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
redis | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
Reflection | β | β | β | β | β | β | β | β | β | β |
session | β | β | β | β | β | β | β | β | β | β |
shmop | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
SimpleXML | β | β | β | β | β | β | β | β | β | β |
snmp | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
soap | β | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
sockets | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
sodium | β | β | β | |||||||
SPL | β | β | β | β | β | β | β | β | β | β |
SQLite | β | β | ||||||||
sqlite3 | β | β | β | β | β | β | β | β | β | |
sqlsrv | d | d | d | d | ||||||
standard | β | β | β | β | β | β | β | β | β | β |
swoole | d | d | d | d | d | d | d | d | d | |
sysvmsg | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
sysvsem | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
sysvshm | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
tidy | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
tokenizer | β | β | β | β | β | β | β | β | β | β |
uploadprogress | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
wddx | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
xdebug | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | |
xml | β | β | β | β | β | β | β | β | β | β |
xmlreader | β | β | β | β | β | β | β | β | β | β |
xmlrpc | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
xmlwriter | β | β | β | β | β | β | β | β | β | β |
xsl | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
Zend OPcache | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
zip | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ | πΈ |
zlib | β | β | β | β | β | β | β | β | β | β |
- Core enabled (cannot be disabled): β
- Enabled (can be disabled): πΈ
- Available, but disabled (can be enabled): d
PHP modules can be enabled or disabled on demand to reflect the state of your target environment.
Documentation: Enable/disable PHP modules
You can also copy any custom modules into mod/(php-fpm)-<VERSION>
and add a custom *.ini
file to load them.
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:
Documentation:
Setup CakePHP | Setup CodeIgniter | Setup CraftCMS | Setup Drupal | Setup Joomla | Setup Laravel | Setup Magento | Setup PhalconPHP | Setup PhotonCMS | Setup PrestaShop | Setup Shopware | Setup Symfony | Setup Typo3 | Setup WordPress | Setup Yii | Setup Zend
As far as tested there are no limitations and you can use any application that creates an open port.
These ports will be reverse proxied by the web server and even allow you to use valid HTTPS for them.
By the built-in autostart feature of the Devilbox you can ensure that your application automatically
starts up as soon as you run docker-compose up
.
Documentation:
Setup reverse proxy NodeJs | Setup reverse proxy Sphinx documentation
The Devilbox comes with a pre-configured intranet on http://localhost
and https://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, ...)
- Adminer
- phpMyAdmin
- phpPgAdmin
- phpRedMin
- OpcacheGUI
Documentation: Devilbox Intranet
A few examples of how the built-in intranet looks like.
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, read up on CONTRIBUTING.md and check the ROADMAP about what is already planned for the near future.
Logos and banners can be found at devilbox/artwork. Feel free to use or modify them by the terms of their license.
Copyright (c) 2016 cytopia