devilbox/README.md

282 lines
15 KiB
Markdown
Raw Normal View History

2016-10-22 17:42:52 +00:00
# ![Devilbox](https://raw.githubusercontent.com/cytopia/devilbox/master/.devilbox/www/htdocs/assets/img/devilbox_80.png) The devilbox
2016-10-09 16:47:49 +00:00
2016-10-22 17:58:42 +00:00
2017-05-20 19:24:04 +00:00
[Usage](#usage) |
[Features](#feature-overview) |
[Documentation](#documentation) |
[Run-time Matrix](#run-time-matrix) |
[Intranet](#intranet-overview) |
[Screenshots](#screenshots) |
[License](#license) |
[Contributing](#contributing) |
2016-10-09 16:47:49 +00:00
2017-05-06 09:17:00 +00:00
![Devilbox](doc/img/devilbox-dash.png)
2016-11-03 15:00:46 +00:00
[![Build Status](https://travis-ci.org/cytopia/devilbox.svg?branch=master)](https://travis-ci.org/cytopia/devilbox) ![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)
2016-10-09 16:47:49 +00:00
2017-05-20 19:24:04 +00:00
The devilbox is a modern and highly customizable alternative for *[XAMPP](https://www.apachefriends.org)* with a few additional feature on top. It is based on `docker-compose` with presets for all kinds of versions for webservers, database servers, php and more.
2016-10-21 01:18:09 +00:00
2017-05-20 19:24:04 +00:00
Configuration is not necessary, as everything is pre-setup with mass virtual hosting and auto-dns.
2016-10-22 17:42:52 +00:00
2016-10-22 17:58:42 +00:00
**Supported operating systems**
![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)
<sub>It might run on FreeBSD, but I don't know the status of docker-compose there.</sub>
---
2016-10-22 17:42:52 +00:00
2017-05-20 19:24:04 +00:00
## Usage
### Quick start
2016-10-21 01:18:09 +00:00
You are up and running in three simple steps:
2017-05-06 09:17:00 +00:00
```shell
2017-05-20 19:39:57 +00:00
# Create docker-compose environment file
2016-10-21 01:18:09 +00:00
$ cp env-example .env
# Edit your configuration
$ vim .env
2017-05-06 09:17:00 +00:00
# Start all containers
2016-10-21 01:18:09 +00:00
$ docker-compose up
2017-05-20 18:13:14 +00:00
```
2017-04-23 11:20:32 +00:00
2017-05-20 19:24:04 +00:00
### 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. Here are a few examples to get you started.
2017-05-20 19:39:57 +00:00
```shell
2017-05-06 09:17:00 +00:00
$ docker-compose up httpd php mysql redis
2016-10-21 01:18:09 +00:00
```
2017-05-20 18:13:14 +00:00
![Devilbox](doc/img/devilbox-dash-01.png)
2017-05-20 19:39:57 +00:00
```shell
2017-05-20 18:13:14 +00:00
$ docker-compose up httpd php mysql pgsql redis memcd
```
![Devilbox](doc/img/devilbox-dash-02.png)
2017-05-20 19:39:57 +00:00
```shell
2017-05-20 18:13:14 +00:00
$ docker-compose up httpd php pgsql memcd
```
![Devilbox](doc/img/devilbox-dash-03.png)
2017-05-20 19:39:57 +00:00
### Run different versions
Every single attachable container comes with many different versions (see **[runtime-matrix](#run-time-matrix)** below). In order to select the desired version for a container, simply edit the `.env` file and uncomment the version of choice.
The following example shows how to set Memcached to version `1.4.28`:
```shell
$ vim .env
...
#MEMCD_SERVER=1.4.21
#MEMCD_SERVER=1.4.22
#MEMCD_SERVER=1.4.23
#MEMCD_SERVER=1.4.24
#MEMCD_SERVER=1.4.25
#MEMCD_SERVER=1.4.26
#MEMCD_SERVER=1.4.27
MEMCD_SERVER=1.4.28
#MEMCD_SERVER=1.4.29
#MEMCD_SERVER=1.4.30
#MEMCD_SERVER=1.4.31
#MEMCD_SERVER=1.4.32
#MEMCD_SERVER=1.4.33
#MEMCD_SERVER=1.4.34
#MEMCD_SERVER=1.4.35
#MEMCD_SERVER=1.4.36
#MEMCD_SERVER=latest
```
2017-05-20 19:50:38 +00:00
### Enter the container
2017-05-20 19:55:22 +00:00
You can also work directly inside the php container if you need to run tools such as `drush`, `drupal-console`, `composer`, `node` etc. Simply use the prepared scripts in the base directory to enter (`PS1` will be populated with current chosen php version):
2017-05-20 19:50:38 +00:00
```shell
# Enter as user devilbox (normal operation / development)
$ ./bash.sh
2017-05-20 19:55:22 +00:00
devilbox@php-7.0.19 in /shared/httpd $
2017-05-20 19:50:38 +00:00
# Enter as root user (do root stuff)
$ ./root_bash.sh
2017-05-20 19:55:22 +00:00
root@php-7.0.19 in /shared/httpd $
2017-05-20 19:50:38 +00:00
```
2017-05-20 19:55:22 +00:00
Your projects can be found in `/shared/httpd` (This is also the place you will land once entered). 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).
2017-05-20 19:50:38 +00:00
2017-05-20 18:13:14 +00:00
## 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.
* **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`)
* **Tools** (git, composer, node, npm, drush, drupal-console, ...)
* **Xdebug**
**Batteries included:**
* [phpMyAdmin](https://www.phpmyadmin.net)
* [Adminer](https://www.adminer.org)
* [OpcacheGUI](https://github.com/PeeHaa/OpCacheGUI)
* Mail viewer
2016-11-06 16:49:48 +00:00
## Documentation
2017-05-20 18:13:14 +00:00
### Video Tutorials
2016-10-25 01:28:58 +00:00
2017-05-20 19:24:04 +00:00
[![Devilbox setup and workflow](doc/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo)
[![Devilbox email catch-all](doc/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY)
2016-10-25 01:28:58 +00:00
2017-05-20 18:13:14 +00:00
### Documentation
2016-11-06 16:49:48 +00:00
2017-05-20 19:24:04 +00:00
For setup, usage and examples see detailed **[Documentation](doc/README.md)**.
2016-11-06 16:49:48 +00:00
2016-10-09 16:47:49 +00:00
## Run-time Matrix
2017-05-20 18:13:14 +00:00
Select your prefered version. (By editing the **`.env`** file)
2016-10-09 16:47:49 +00:00
2017-05-20 18:13:14 +00:00
No need to install and configure different versions locally. Simply choose your required LAMP/LEMP stack versions during startup and it is up and running instantly.
2016-10-10 08:16:09 +00:00
2017-05-20 18:13:14 +00:00
#### 1/3 Base stack (required)
2017-04-23 11:20:32 +00:00
2017-05-20 18:13:14 +00:00
| DNS | Webserver | PHP |
|-----|-----------|-----|
| [![Build Status](https://travis-ci.org/cytopia/docker-bind.svg?branch=master)](https://travis-ci.org/cytopia/docker-bind) [Bind](https://github.com/cytopia/docker-bind) | [![Build Status](https://travis-ci.org/cytopia/docker-apache-2.2.svg?branch=master)](https://travis-ci.org/cytopia/docker-apache-2.2) [Apache 2.2](https://github.com/cytopia/docker-apache-2.2) | [![Build Status](https://travis-ci.org/cytopia/docker-php-fpm-5.4.svg?branch=master)](https://travis-ci.org/cytopia/docker-php-fpm-5.4) [PHP 5.4](https://github.com/cytopia/docker-php-fpm-5.4) |
| | [![Build Status](https://travis-ci.org/cytopia/docker-apache-2.4.svg?branch=master)](https://travis-ci.org/cytopia/docker-apache-2.4) [Apache 2.4](https://github.com/cytopia/docker-apache-2.4) | [![Build Status](https://travis-ci.org/cytopia/docker-php-fpm-5.5.svg?branch=master)](https://travis-ci.org/cytopia/docker-php-fpm-5.5) [PHP 5.5](https://github.com/cytopia/docker-php-fpm-5.5) |
| | [![Build Status](https://travis-ci.org/cytopia/docker-nginx-stable.svg?branch=master)](https://travis-ci.org/cytopia/docker-nginx-stable) [Nginx stable](https://github.com/cytopia/docker-nginx-stable) | [![Build Status](https://travis-ci.org/cytopia/docker-php-fpm-5.6.svg?branch=master)](https://travis-ci.org/cytopia/docker-php-fpm-5.6) [PHP 5.6](https://github.com/cytopia/docker-php-fpm-5.6) |
| | [![Build Status](https://travis-ci.org/cytopia/docker-nginx-mainline.svg?branch=master)](https://travis-ci.org/cytopia/docker-nginx-mainline) [Nginx mainline](https://github.com/cytopia/docker-nginx-mainline) | [![Build Status](https://travis-ci.org/cytopia/docker-php-fpm-7.0.svg?branch=master)](https://travis-ci.org/cytopia/docker-php-fpm-7.0) [PHP 7.0](https://github.com/cytopia/docker-php-fpm-7.0) |
| | | [![Build Status](https://travis-ci.org/cytopia/docker-php-fpm-7.1.svg?branch=master)](https://travis-ci.org/cytopia/docker-php-fpm-7.1) [PHP 7.1](https://github.com/cytopia/docker-php-fpm-7.1) |
| | | [![Build Status](https://travis-ci.org/cytopia/docker-hhvm-latest.svg?branch=master)](https://travis-ci.org/cytopia/docker-hhvm-latest) [HHVM latest](https://github.com/cytopia/docker-hhvm-latest)
2016-10-30 14:26:44 +00:00
2017-05-20 18:13:14 +00:00
<sub>**Note:** Entries without links or without build-status are planned, but not yet available. See [ROADMAP](https://github.com/cytopia/devilbox/issues/23) for tasks and upcoming features.</sub>
2017-04-23 11:20:32 +00:00
2017-05-20 18:13:14 +00:00
#### 2/3 SQL stack (optional)
2016-10-25 20:27:34 +00:00
2017-05-20 18:13:14 +00:00
| MySQL | PostgreSQL | MS SQL |
|-------|------------|--------|
| [![Build Status](https://travis-ci.org/cytopia/docker-mysql-5.5.svg?branch=master)](https://travis-ci.org/cytopia/docker-mysql-5.5) [MySQL 5.5](https://github.com/cytopia/docker-mysql-5.5) | [![Build Status](https://travis-ci.org/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 9.1](https://hub.docker.com/_/postgres/) | MS SQL 2017 |
| [![Build Status](https://travis-ci.org/cytopia/docker-mysql-5.6.svg?branch=master)](https://travis-ci.org/cytopia/docker-mysql-5.6) [MySQL 5.6](https://github.com/cytopia/docker-mysql-5.6) | [![Build Status](https://travis-ci.org/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 9.2](https://hub.docker.com/_/postgres/) | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mysql-5.7.svg?branch=master)](https://travis-ci.org/cytopia/docker-mysql-5.7) [MySQL 5.7](https://github.com/cytopia/docker-mysql-5.7) | [![Build Status](https://travis-ci.org/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 9.3](https://hub.docker.com/_/postgres/) | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mysql-8.0.svg?branch=master)](https://travis-ci.org/cytopia/docker-mysql-8.0) [MySQL 8.0](https://github.com/cytopia/docker-mysql-8.0) | [![Build Status](https://travis-ci.org/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 9.4](https://hub.docker.com/_/postgres/) | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mariadb-5.5.svg?branch=master)](https://travis-ci.org/cytopia/docker-mariadb-5.5) [MariaDB 5.5](https://github.com/cytopia/docker-mariadb-5.5) | [![Build Status](https://travis-ci.org/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 9.5](https://hub.docker.com/_/postgres/) | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mariadb-10.0.svg?branch=master)](https://travis-ci.org/cytopia/docker-mariadb-10.0) [MariaDB 10.0](https://github.com/cytopia/docker-mariadb-10.0) | [![Build Status](https://travis-ci.org/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 9.6](https://hub.docker.com/_/postgres/) | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mariadb-10.1.svg?branch=master)](https://travis-ci.org/cytopia/docker-mariadb-10.1) [MariaDB 10.1](https://github.com/cytopia/docker-mariadb-10.1) | | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mariadb-10.2.svg?branch=master)](https://travis-ci.org/cytopia/docker-mariadb-10.2) [MariaDB 10.2](https://github.com/cytopia/docker-mariadb-10.2) | | |
| [![Build Status](https://travis-ci.org/cytopia/docker-mariadb-10.3.svg?branch=master)](https://travis-ci.org/cytopia/docker-mariadb-10.3) [MariaDB 10.3](https://github.com/cytopia/docker-mariadb-10.3) | | |
2016-10-10 08:16:09 +00:00
2017-05-20 18:13:14 +00:00
<sub>**Note:** Entries without links or without build-status are planned, but not yet available. See [ROADMAP](https://github.com/cytopia/devilbox/issues/23) for tasks and upcoming features.</sub>
2016-10-30 14:26:44 +00:00
2017-05-20 18:13:14 +00:00
#### 3/3 NoSQL stack (optional)
2017-04-23 11:20:32 +00:00
2016-10-30 14:26:44 +00:00
| Cassandra | CouchDB | Memcached | MongoDB | Redis |
|-----------|---------|-----------|---------|-------|
2017-05-06 09:17:00 +00:00
| Cassandra 2.1 | CouchDB 1.6 | [![Travis CI](https://img.shields.io/travis/docker-library/memcached/master.svg)](https://travis-ci.org/docker-library/memcached/branches) Memcached latest | MongoDB 2.6 | [![Travis CI](https://img.shields.io/travis/docker-library/redis/master.svg)](https://travis-ci.org/docker-library/redis/branches) [Redis 2.8](https://github.com/docker-library/redis) |
2017-04-23 11:20:32 +00:00
| Cassandra 2.2 | CouchDB 2.0 | | MongoDB 3.0 | [![Travis CI](https://img.shields.io/travis/docker-library/redis/master.svg)](https://travis-ci.org/docker-library/redis/branches) [Redis 3.0](https://github.com/docker-library/redis) |
| Cassandra 3.0 | | | MongoDB 3.2 | [![Travis CI](https://img.shields.io/travis/docker-library/redis/master.svg)](https://travis-ci.org/docker-library/redis/branches) [Redis 3.2](https://github.com/docker-library/redis) |
| | | | MongoDB 3.4 | |
2016-10-30 14:26:44 +00:00
2017-05-20 18:13:14 +00:00
<sub>**Note:** Entries without links or without build-status are planned, but not yet available. See [ROADMAP](https://github.com/cytopia/devilbox/issues/23) for tasks and upcoming features.</sub>
2016-11-03 14:22:31 +00:00
2017-05-06 09:17:00 +00:00
2016-10-30 15:11:54 +00:00
<!--
**Optional search stack**
| Apache Solr | Elasticsearch |
|-------------|---------------|
| todo | |
-->
2016-10-30 14:26:44 +00:00
<!--
**Optional cgi stack**
| Go | Perl | Python | Ruby |
|------|------|--------|------|
| todo | todo | todo | todo |
-->
2016-10-21 01:18:09 +00:00
2016-10-29 09:18:38 +00:00
<!--
2016-10-27 07:19:53 +00:00
## Documentation
* Configuration
* Xdebug
2016-10-29 09:18:38 +00:00
-->
2016-10-27 07:19:53 +00:00
2016-10-21 01:18:09 +00:00
## Intranet overview
2016-10-09 16:47:49 +00:00
2017-05-20 19:24:04 +00:00
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.
2016-10-10 11:06:47 +00:00
2017-05-20 19:24:04 +00:00
* **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)**
2016-10-10 11:06:47 +00:00
2016-10-22 17:22:17 +00:00
2016-10-21 01:18:09 +00:00
## Screenshots
2016-10-10 11:14:27 +00:00
2017-05-20 19:24:04 +00:00
### Homepage with host / docker information
2016-10-10 11:14:27 +00:00
The homepage shows you the status of your current configured setup.
* which versions are used
* what directories are mounted
2017-05-20 19:24:04 +00:00
* where does DNS point to
2016-10-10 11:14:27 +00:00
* what other settings have been set
2017-05-20 19:24:04 +00:00
* did any errors occur?
2016-10-10 11:14:27 +00:00
2017-05-20 19:24:04 +00:00
![Intranet Home](doc/img/01_intranet_home.png "Intranet Home")
2016-10-10 11:14:27 +00:00
2017-05-20 19:24:04 +00:00
### Virtual Host overview
2016-10-10 11:14:27 +00:00
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
2017-05-20 19:24:04 +00:00
* `/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).
2016-10-10 11:14:27 +00:00
2017-05-20 19:24:04 +00:00
![Intranet vHost](doc/img/02_intranet_vhosts.png "Intranet Home")
2016-10-10 11:14:27 +00:00
2017-05-20 19:24:04 +00:00
### Database overview
2016-10-10 11:14:27 +00:00
Shows you all the databases that are loaded
2017-05-20 19:24:04 +00:00
![Intranet DB](doc/img/03_intranet_databases.png "Intranet Home")
2017-05-20 19:24:04 +00:00
### 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.
2017-05-20 19:24:04 +00:00
![Intranet Email](doc/img/04_intranet_emails.png "Intranet Home")
## License
[MIT License](LICENSE.md)
2016-11-06 16:49:48 +00:00
## Contributing
2017-05-20 19:24:04 +00:00
There is quite a lot todo and planned. If you like to contribute, view [CONTRIBUTING.md](CONTRIBUTING.md) and [ROADMAP](https://github.com/cytopia/devilbox/issues/23).
2016-11-06 16:49:48 +00:00
2017-05-06 09:17:00 +00:00
Contributors will be credited within the intranet and on the github page.
2016-11-06 16:49:48 +00:00