Overview | Quickstart | Install | Update | Configure | Run | Usage | OS | Backups | Examples | Technical | Hacking | FAQ
The devilbox provides popular tools for setting up and managing major frameworks or content management systems, as well as tools for static code analysis. The following bundled tools are available inside each PHP|HHVM Docker container:
You can use the following tools to setup or manage your Frameworks/CMS.
Binary | Tool name | Framework/CMS |
---|---|---|
composer |
composer | CakePHPi, Symfony, Yii, Zend and others |
drush |
drush | Drupal |
drupal |
drupal-consol | Drupal |
git |
git | Everything available on github and other git servers |
laravel |
laravel installer | Laravel |
phalcon |
phalcon devtools | Phalcon |
symfony |
symfony installer | Symfony |
wp |
wp-cli | Wordpress |
You can use the following tools to analyse and fix your source code files.
Binary | Tool name | Description |
---|---|---|
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 |
awesome-ci | General file, code and repository analysis and linting (Some of them also support to fix the problems) |
phpcs |
phpcs | Lint and optionally fix your PHP files |
eslint |
eslint | Lint and optionally fix your JS files |
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-cake | /shared/httpd/my-cake | my_cake | loc | http://my-cake.loc |
It will be ready in eight simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install CakePHP via
composer
- Symlink webroot directory
- Add MySQL database
- Configure datbase connection
- Setup DNS record
- Visit http://my-cake.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-cake
[email protected] in /shared/httpd $ cd my-cake
# 3. Install CakePHP via composer
[email protected] in /shared/httpd/my-cake $ composer create-project --prefer-dist cakephp/app cakephp
# 4. Symlink webroot directory
[email protected] in /shared/httpd/my-cake $ ln -s cakephp/webroot/ htdocs
# 5. Add MySQL datbase
[email protected] in /shared/httpd/my-cake $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_cake;'
# 6. Configure datbase connection
[email protected] in /shared/httpd/my-cake $ vi cakephp/config/app.php
<?php
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => '127.0.0.1',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'non_standard_port_number',
'username' => 'root',
'password' => 'secret',
'database' => 'my_cake',
'encoding' => 'utf8',
'timezone' => 'UTC',
'flags' => [],
'cacheMetadata' => true,
7. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-cake.loc
8. Open your browser
All set now, you can visit http://my-cake.loc in your browser.
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-drupal | /shared/httpd/my-drupal | my_drupal | loc | http://my-drupal.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install Drupal via
drush
- Symlink Drupal directory
- Setup DNS record
- Visit http://my-drupal.loc in your browser and follow instructions
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-drupal
[email protected] in /shared/httpd $ cd my-drupal
# 3. Install Drupal via drush
[email protected] in /shared/httpd/my-drupal $ drush dl drupal
# 4. Symlink Drupal directory
[email protected] in /shared/httpd/my-drupal $ ln -s drupal-8.3.3 htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-drupal.loc
6. Open your browser
Open your browser at http://my-drupal.loc and follow the Drupal installation steps.
Note: For MySQL host choose 127.0.0.1
.
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-joomla | /shared/httpd/my-joomla | - | loc | http://my-joomla.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Download and extract Joomla
- Symlink public directory
- Setup DNS record
- Visit http://my-joomla.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-joomla
[email protected] in /shared/httpd $ cd my-joomla
# 3. Download and extract Joomla
[email protected] in /shared/httpd/my-joomla $ wget -O joomla.tar.gz https://downloads.joomla.org/cms/joomla3/3-8-0/joomla_3-8-0-stable-full_package-tar-gz?format=gz
[email protected] in /shared/httpd/my-joomla $ mkdir joomla/
[email protected] in /shared/httpd/my-joomla $ tar xvfz joomla.tar.gz -C joomla/
# 4. Symlink Joomla directory
[email protected] in /shared/httpd/my-joomla $ ln -s joomla htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-joomla.loc
6. Open your browser
Open your browser at http://my-joomla.loc
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-laravel | /shared/httpd/my-laravel | - | loc | http://my-laravel.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install Laravel via
laravel
- Symlink public directory
- Setup DNS record
- Visit http://my-laravel.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-laravel
[email protected] in /shared/httpd $ cd my-laravel
# 3. Install Laravel via laravel
[email protected] in /shared/httpd/my-laravel $ laravel new laravel-project
# 4. Symlink public directory
[email protected] in /shared/httpd/my-laravel $ ln -s laravel-project/public htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-laravel.loc
6. Open your browser
Open your browser at http://my-laravel.loc
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-phalcon | /shared/httpd/my-phalcon | - | loc | http://my-phalcon.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install Phalcon via
phalcon
- Symlink public directory
- Setup DNS record
- Visit http://my-phalcon.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-phalcon
[email protected] in /shared/httpd $ cd my-phalcon
# 3. Install Phalcon via phalcon
[email protected] in /shared/httpd/my-phalcon $ phalcon project phalconphp
# 4. Symlink public directory
[email protected] in /shared/httpd/my-phalcon $ ln -s phalconphp/public htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-phalcon.loc
6. Open your browser
Open your browser at http://my-phalcon.loc
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-symfony | /shared/httpd/my-symfony | - | loc | http://my-symfony.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install Symfony via
symfony
- Symlink web directory
- Enable Symfony prod (app.php)
- Setup DNS record
- Visit http://my-symfony.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-symfony
[email protected] in /shared/httpd $ cd my-symfony
# 3. Install Symfony via symfony
[email protected] in /shared/httpd/my-symfony $ symfony new symfony
# 4. Symlink web directory
[email protected] in /shared/httpd/my-symfony $ ln -s symfony/web htdocs
# 5. Enable Symfony production (app.php)
[email protected] in /shared/httpd/my-symfony $ cd symfony/web
[email protected] in /shared/httpd/my-symfony/symfony/web $ ln -s app.php index.php
6. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-symfony.loc
7. Open your browser
Open your browser at http://my-symfony.loc
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-wp | /shared/httpd/my-wp | my_wp | loc | http://my-wp.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Download Wordpress via
git
- Symlink wordpress git directory
- Setup DNS record
- Visit http://my-wp.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-wp
[email protected] in /shared/httpd $ cd my-wp
# 3. Download Wordpress via git
[email protected] in /shared/httpd/my-wp $ git clone https://github.com/WordPress/WordPress wordpress.git
# 4. Symlink wordpress git directory
[email protected] in /shared/httpd/my-wp $ ln -s wordpress.git htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-wp.loc
6. Open your browser
Open your browser at http://my-wp.loc
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-yii | /shared/httpd/my-yii | - | loc | http://my-yii.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install Yii2 via
composer
- Symlink web directory
- Setup DNS record
- Visit http://my-yii.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-yii
[email protected] in /shared/httpd $ cd my-yii
# 3. Install Yii2 via composer
[email protected] in /shared/httpd/my-yii $ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic yii2-dev
# 4. Symlink web directory
[email protected] in /shared/httpd/my-yii $ ln -s yii2-dev/web htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-yii.loc
6. Open your browser
Open your browser at http://my-yii.loc
The following configuration will be used:
Project name | VirtualHost directory | Database | TLD_SUFFIX | Url |
---|---|---|---|---|
my-zend | /shared/httpd/my-zend | - | loc | http://my-zend.loc |
It will be ready in six simple steps:
- Enter the PHP container
- Create a new VirtualHost directory
- Install Zendframework via
composer
- Symlink public directory
- Setup DNS record
- Visit http://my-zend.loc in your browser
# 1. Enter the PHP container
host> ./shell.sh
# 2. Create a new VirtualHost directory
[email protected] in /shared/httpd $ mkdir my-zend
[email protected] in /shared/httpd $ cd my-zend
# 3. Install Zendframework via composer
[email protected] in /shared/httpd/my-zend $ composer create-project --prefer-dist zendframework/skeleton-application zend
# 4. Symlink public directory
[email protected] in /shared/httpd/my-zend $ ln -s zend/public htdocs
5. DNS record
If you do not have auto-DNS configured, you will need to add the following line to your Host computer's /etc/hosts
:
127.0.0.1 my-zend.loc
6. Open your browser
Open your browser at http://my-zend.loc
awesome-ci is a collection of tools for analysing your workspace and its files. You can for example check for:
- git conflicts
- git ignored files that have not been removed from the git index
- trailing spaces and newlines
- non-utf8 files or utf8 files with bom
- windows line feeds
- null-byte characters
- empty files
- syntax errors for various languages
- inline css or js code
- customized regex
Some of the bundled tools allow for automatic fixing. See the project page for how to use it: https://github.com/cytopia/awesome-ci.
The following shows an example how to use it with the devilbox:
# 1. Enter your PHP/HHVM container
host> ./bash
# 2. Go to your project folder
[email protected] $ cd /shared/httpd/my-project
# 3. Run the tools
[email protected] $ git-conflicts --path=.
[email protected] $ git-ignored --path=.
[email protected] $ file-cr --path=.
[email protected] $ file-crlf --path=.
[email protected] $ file-empty --path=.
# 4. Run tools with more options
[email protected] $ syntax-php --path=. --extension=php
[email protected] $ syntax-php --path=. --shebang=php
...
phpcs is also available the devilbox:
# 1. Enter your PHP/HHVM container
host> ./bash
# 2. Go to your project folder
[email protected] $ cd /shared/httpd/my-project
# 3. Run it
[email protected] $ phpcs .
For more details visit its project page https://github.com/squizlabs/PHP_CodeSniffer.
eslint is also available the devilbox:
# 1. Enter your PHP/HHVM container
host> ./bash
# 2. Go to your project folder
[email protected] $ cd /shared/httpd/my-project
# 3. Run it
[email protected] $ eslint .
For more details visit its project page http://eslint.org.