Git Product home page Git Product logo

devilbox's Introduction

The Devilbox

Devilbox

用法 | 可用的容器 | Community | 特色 | Intranet | 截图 | Contributing | Logos | License

Devilbox

Build Status Documentation Status Tag type License

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 already pre-setup.

Furthermore, the Devilbox provides an identical and reproducable development environment for different host operating systems.

前提条件

Linux OSX Windows Plus Docker

可用的容器

有以下预置的容器

Web server SQL NoSQL Queue & Search Misc
Apache MariaDB Memcached RabbitMQ Bind
Nginx MySQL MongoDB Solr Blackfire
PerconaDB Redis MailHog
PostgreSQL PHP

文档: Available Container

社区讨论

查找文档和帮助

论坛

devilbox.readthedocs.io gitter.im/devilbox coming soon

用法

快速入门

Linux 和 MacOS Windows
# 下载Devilbox
$ git clone https://github.com/cytopia/devilbox
# 创建 docker-compose 环境文件
$ cd devilbox
$ cp env-example .env
# 编辑配置文件
$ vim .env
# 启动所有的容器
$ docker-compose up
1. Clone https://github.com/cytopia/devilbox to C:\devilbox with Git for Windows

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

文档: Install the Devilbox | Start the Devilbox | .env file

有选择的启动

上面会启动所有的容器,实际上,你可以只启动需要的容器. 只需要在docker-compose中简单地指定

$ docker-compose up httpd php mysql redis

文档: Start only some container

Devilbox

运行不同的版本

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.1 2.8 1.4.21 2.8
2.4 mainline 5.3 5.6 10.0 5.6 9.2 3.0 1.4.22 3.0
5.4 5.7 10.1 5.7 9.3 3.2 1.4.23 3.2
5.5 8.0 10.2 9.4 4.0 1.4.24 3.4
5.6 10.3 9.5 ... 3.5
7.0 9.6 1.5.2
7.1 10.0 latest
7.2
7.3

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

文档: 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

文档: 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).

文档: Work inside the PHP container | Directory overview

视频介绍

Devilbox setup and workflow Devilbox email catch-all

特色概况

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.

文档: Devilbox Prerequisites

特色

⭐ 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.
⭐ Custom domains Choose whatever development domain you desire: *.loc, *.local, *.dev or use real domains as well: *.example.com
⭐ Auto DNS An integraded BIND server is able to create DNS entries automatically for your chosen domains.
⭐ 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.

文档: Setup Auto DNS | Setup valid HTTPS | Configure Xdebug | Customize PHP

Batteries

The following batteries are available in the Devilbox intranet by default:

Adminer phpMyAdmin phpRedMin OpCacheGUI Mail viewer
Adminer phpMyAdmin phpRedMin OpCache GUI Mail viewer

文档: Devilbox Intranet

工具Tools

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.
🔧 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:

Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox

文档: Available Tools

可用的php模块

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

PHP modules can be enabled or disabled on demand to reflect the state of your target environment.

Documentation: Enable/disable PHP modules

自定义PHP模块

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:

Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox

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

Intranet overview

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
  • phpRedMin
  • OpcacheGUI

Documentation: Devilbox Intranet

Screenshots

A few examples of how the built-in intranet looks like.

Contributing Open Source Helpers

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

Logos and banners can be found at devilbox/artwork. Feel free to use or modify them by the terms of their license.

License

MIT License

Copyright (c) 2016 cytopia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.