A modern Docker LAMP stack and MEAN stack for local development
Go to file
2017-06-25 14:44:51 +02:00
.devilbox REL-0.11 Show versions in intranet 2017-06-25 14:44:51 +02:00
.github Feature/repo organization (#19) 2016-10-31 14:55:15 +01:00
.tests DVL-016 clean-up after gh-pages branch 2017-06-20 12:16:27 +02:00
cfg REL-0.11 Documentation about MySQL|MariaDB Configuration 2017-06-21 18:52:37 +02:00
docs REL-0.11 OS differences 2017-06-25 13:57:29 +02:00
log DVL-007 Fix gitignore and re-add ignored files 2017-04-22 11:58:17 +02:00
.gitignore REL-0.11 Ignoring *.swm files 2017-06-20 12:16:27 +02:00
.travis.yml REL-0.11 Switch to new travis environment 2017-06-22 11:34:38 +02:00
bash.sh REL-0.9 Adding docker entering scripts 2017-05-16 20:37:57 +02:00
CONTRIBUTING.md Clean Contributing file 2016-11-03 09:09:39 +01:00
docker-compose.yml REL-0.11 Attaching tagged docker container 2017-06-22 12:31:35 +02:00
env-example REL-0.11 Changing default Bind port from 53 to 1053 2017-06-20 12:16:27 +02:00
LICENSE.md Initial commit 2016-10-09 18:47:49 +02:00
README.md REL-0.11 Show versions in intranet 2017-06-25 14:44:51 +02:00
root_bash.sh REL-0.9 Adding docker entering scripts 2017-05-16 20:37:57 +02:00
update-docker.sh DVL-016 Usage documentation 2017-06-20 12:16:27 +02:00

Devilbox The devilbox

Usage | Features | Documentation | Run-time Matrix | Intranet | Screenshots | Contributing | License

Devilbox

Build Status Tag type License

The devilbox is a modern and highly customisable LAMP and MEAN stack replacement based purely on docker and docker-compose running on all major platforms. It supports an unlimited number of projects for which vhosts 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 and also offers Auto-DNS.

Supported operating systems

Linux Windows OSX

It might run on FreeBSD, but I don't know the status of docker-compose there.


Usage

Quick start

You are up and running in three simple steps:

# 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.

$ docker-compose up httpd php mysql redis

Devilbox

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.

Apache Nginx PHP MySQL MariaDB PgSQL Redis Memcached MongoDB
2.2 stable 5.4 5.5 5.5 9.1 2.8 1.4.21 2.8
2.4 mainline 5.5 5.6 10.0 9.2 3.0 1.4.22 3.0
5.6 5.7 10.1 9.3 3.2 1.4.23 3.2
7.0 8.0 10.2 9.4 ... 3.4
7.1 10.3 9.5 1.4.36 3.5
HHVM 9.6 latest

Enter the container

You can also work directly inside the php container. Simply use the bundled scripts bash.sh or root_bash.sh. The PS1 will automatically be populated with current chosen php version.

# Enter as user devilbox (normal operation / development)
host> ./bash.sh
devilbox@php-7.0.19 in /shared/httpd $
# Enter as root user (do root stuff)
host> ./root_bash.sh
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).

Feature 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.

Features

  • Mass virtual host
  • Custom domains (*.loc, *.local, *.dev, ...)
  • Auto-DNS (Internal Bind server running)
  • Email catch-all (Internal postfix with catch-all)
  • Log files (available on host computer)
  • Config overwrites (my.cnf, nginx.conf, httpd.conf or php.ini)
  • Self-validation (projects and configured options are validated and marked in the intranet)
  • Xdebug

Batteries

Tools

tool binary
composer composer
drupal-console drupal
drush drush
git git
laravel installer laravel
mysqldump-secure mysqldump-secure
node node
npm npm
phalcon-devtools phalcon
symfony installer symfony
wp-cli wp

Require additional tools? Have a look at Hacking for information about how to add your own tools or open up an issue with a new tool request.

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.

apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, magickwand, mbstring, mcrypt, memcache, memcached, mhash, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

Documentation

Video Tutorials

To get you started quickly, lean back and watch the following videos on Youtube.

Devilbox setup and workflow Devilbox email catch-all

Documentation explained

The devilbox documentation consists of the following main sections.

Documentaion Description
Overview General overview
Quickstart Everything needed to get you started in no time
Install Installation information for different operating systems
Update Update strategies
Configure How to configure the devilbox and its services
Run Explanation of different required docker-compose run commands
Usage How to use the devilbox in detail
OS Operating system specific information
Backups How to backup and restore various databases
Examples How to setup different frameworks: drupal, Yii, Symfony, Phalcon, Wordpress...
Technical Technical background information
Hacking Hack the devilbox and integrate custom stuff
FAQ Frequently asked questions

Documentation

  1. Overview
  2. Main idea
  3. Features
  4. Supported Host OS
  5. Requirements
  6. Docker documentation
  7. Devilbox documentation
  8. Video Tutorials
  9. Available PHP Modules
  10. Supported Frameworks and CMS
  11. Quickstart
  12. Installation
  13. Update
  14. Configuration
  15. Run
  16. Project setup
  17. Enter the PHP Docker container
  18. Install
  19. Install Docker 1. Linux 2. Windows 3. OSX
  20. Install Devilbox
  21. Update
  22. TL;DR
  23. Git tag vs master branch
  24. Compare .env file
  25. Pull new Docker container (Important!)
  26. Remove anonymous volumes
  27. Configure
  28. Overview
  29. Devilbox general settings
  30. Project settings
  31. Container settings
  32. Intranet settings
  33. Host computer
  34. Run
  35. Start the devilbox
  36. Stop the devilbox
  37. Attach/Detach during run-time
  38. Docker logs
  39. Usage
  40. Mounted directories
  41. Work on the Docker host
  42. Work inside the PHP container
  43. Managing Projects explained
  44. Creating new Projects
  45. Switching container versions
  46. Emails
  47. Log files
  48. Intranet
  49. OS
  50. Linux
  51. Windows
  52. OSX
  53. Backups
  54. Info
  55. MySQL 1. MySQL Database Backup 2. MySQL Database Restore
  56. PostgreSQL 1. PostgreSQL Database Backup 2. PostgreSQL Database Restore
  57. MongoDB 1. MongoDB Database Backup 2. MongoDB Database Restore
  58. Examples
  59. Introduction
  60. Setup CakePHP
  61. Setup Drupal
  62. Setup Phalcon
  63. Setup Symfony
  64. Setup Wordpress
  65. Setup Yii
  66. Setup Zend
  67. Technical
  68. Networking
  69. Ports and forwarding
  70. Works the same on Host and PHP Container
  71. Hacking
  72. Rebuilding bundled Docker container
  73. Customizing the bundled Docker container
  74. Adding your own Docker container
  75. FAQ

Run-time Matrix

The main idea of the devilbox is to selectively run and combine any version you require for your currently desired development stack. Services are grouped into different stacks, currently into Base, SQL and NoSQL. However there are many more to come. If you find yourself in need of a stack or service that is not yet inluded, just open up an issue or pull request.

In order to make sure every combination works with each other, the devilbox integrates extensive CI tests for the Docker container itself and their combinations. The following tables show the available stacks including git repositories and travis-ci checks.

Note: Entries without links or without build-status are planned, but not yet available. See ROADMAP for tasks and upcoming features.

Base stack (required)

DNS Webserver PHP
Build Status Bind Build Status Apache 2.2 Build Status PHP 5.4
Build Status Apache 2.4 Build Status PHP 5.5
Build Status Nginx stable Build Status PHP 5.6
Build Status Nginx mainline Build Status PHP 7.0
Build Status PHP 7.1
Build Status HHVM latest

SQL stack (optional)

MySQL PostgreSQL MS SQL
Build Status MySQL 5.5 Build Status PgSQL 9.1 MS SQL 2017
Build Status MySQL 5.6 Build Status PgSQL 9.2
Build Status MySQL 5.7 Build Status PgSQL 9.3
Build Status MySQL 8.0 Build Status PgSQL 9.4
Build Status MariaDB 5.5 Build Status PgSQL 9.5
Build Status MariaDB 10.0 Build Status PgSQL 9.6
Build Status MariaDB 10.1
Build Status MariaDB 10.2
Build Status MariaDB 10.3

NoSQL stack (optional)

Cassandra CouchDB Memcached MongoDB Redis
Cassandra 2.1 CouchDB 1.6 Travis CI latest build Status 2.8 Travis CI 2.8
Cassandra 2.2 CouchDB 2.0 build Status 3.0 Travis CI 3.0
Cassandra 3.0 build Status 3.2 Travis CI 3.2
build Status 3.4
build Status 3.5

Intranet overview

The devilbox comes with a pre-configured intranet on http://localhost. It will not only show you, your chosen configuration, but also validate the status of your configuration, such as Do 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
  • Adminer
  • OpcacheGUI

Screenshots

Homepage with host / docker information

The homepage shows you the status of your current configured setup.

  • which versions are used
  • what directories are mounted
  • where does DNS point to
  • what other settings have been set
  • did any errors occur?

Intranet Home

Virtual Host overview

This overview shows you all available virtual hosts and if they need additional configuration (on the host)

Virtual Hosts are considered valid if the following requirements are met (on the host system):

  • htdocs folder/symlink exists in your project folder
  • /etc/hosts has a valid DNS config for your host: 127.0.0.1 <project-folder>.<TLD_SUFFIX> (alternatively the bundle BIND server can be attached to your host-computer).

Intranet vHost

Database overview

Shows you all the databases that are loaded

Intranet DB

Email overview

Shows you all the emails that have been sent. No email will actually be sent outside, but they are all catched by one account and presented here.

Intranet Email

Contributing

Contributers are welcome in any way.

First of all, if you like the project, please do star it. Starring is an important measurement to see the number of active users and better allows me to organize my time and effort I can put into this project.

Secondly, please do report all bugs. This will not only help you get your problem fixed, but also help others as they might encounter the same.

And last but not least, you can also get actively involved. Do clone the project and start improving whatever you think is useful. There is quite a lot todo and planned. If you like to contribute, view CONTRIBUTING.md and ROADMAP.

Major contributors will be credited within the intranet and on the github page.

License

MIT License