Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into skeleton-stack
Browse files Browse the repository at this point in the history
* upstream/master:
  DVL-012 Documentation: Customize bash and vim
  DVL-012 be able to customize bash config files
  DVL-012 Name correct required Docker version in documentation
  DVL-012 cytopia#112 Fixes wrong docker-compose var for BIND
  DVL-012 Fix ToC on README.md
  DVL-012 Fix ToC
  DVL-012 Add documentation for awesome-ci
  DVL-012 Documentation: Add ToC for FAQ section
  DVL-012 Documentation: How to load custom PHP modules
  DVL-012 cytopia#107 Allow to load custom PHP modules
  DVL-012 Fix cytopia#97 Devilbox UI footer overlaps embedded tools
  • Loading branch information
Cezarion committed Aug 21, 2017
2 parents 6994b20 + 0c4290b commit 2dbb2df
Show file tree
Hide file tree
Showing 24 changed files with 427 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .devilbox/www/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


$DEVILBOX_VERSION = 'v0.11';
$DEVILBOX_DATE = '2017-06-25';
$DEVILBOX_DATE = '2017-08-16';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';

//
Expand Down
5 changes: 4 additions & 1 deletion .devilbox/www/htdocs/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ html {
}
body {
/* Margin bottom by footer height */
margin-bottom: 80px;
margin-bottom: 80px !important;
}
.footer {
position: absolute;
Expand Down Expand Up @@ -190,3 +190,6 @@ td.break-word {
#lang {
top: 53px !important;
}
.pages {
z-index:1000;
}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
/cfg/php-fpm-7.2/*.ini
/cfg/hhvm-latest/*.ini

# Ignore custom PHP-FPM modules
/mod/php-fpm-5.4/*.so
/mod/php-fpm-5.5/*.so
/mod/php-fpm-5.6/*.so
/mod/php-fpm-7.0/*.so
/mod/php-fpm-7.1/*.so
/mod/php-fpm-7.2/*.so
/mod/hhvm-latest/*.so

# Ignore custom bash and other confi files
/bash/*
!/bash/bashrc.sh-example
!/bash/README.md

######################################
# GENERIC
Expand Down
54 changes: 34 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,16 @@ Every single attachable container comes with many different versions. In order t

#### 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.
You can also work directly inside the php container. Simply use the bundled scripts `shell.sh`. The `PS1` will automatically be populated with current chosen php version.
```shell
# Enter as user devilbox (normal operation / development)
host> ./bash.sh
host> ./shell.sh
devilbox@php-7.0.19 in /shared/httpd $
```
```shell
# Enter as root user (do root stuff)
host> ./root_bash.sh
host> ./shell.sh
devilbox@php-7.0.19 in /shared/httpd $ sudo su -
root@php-7.0.19 in /shared/httpd $
```

Expand All @@ -248,6 +249,7 @@ The devilbox has everything setup for you. The only thing you will have to insta
* **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`)
* **Custom PHP modules**
* **Self-validation** (projects and configured options are validated and marked in the intranet)
* **Xdebug**

Expand All @@ -262,6 +264,7 @@ The devilbox has everything setup for you. The only thing you will have to insta

| tool | binary |
|----------------|---------|
| [awesome-ci](https://github.com/cytopia/awesome-ci) | `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` |
| [composer](https://getcomposer.org) | `composer` |
| [drupal-console](https://drupalconsole.com) | `drupal` |
| [drush](http://www.drush.org) | `drush` |
Expand All @@ -282,6 +285,10 @@ The devilbox is a development stack, so it is made sure that a lot of PHP module

> *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*
** Custom PHP Modules**

You can also copy any custom modules into `mod/(php-fpm|hhvm)-<VERSION>` and add a custom `*.ini` file to load them. See [Custom PHP Modules](docs/Configure.md#425-custom-php-modules) in the Configuration documentation for how to do that in two simple steps.

#### Supported Frameworks

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:
Expand Down Expand Up @@ -346,9 +353,9 @@ The devilbox documentation consists of the following main sections.
6. [Enter the PHP Docker container](docs/Quickstart.md#6-enter-the-php-docker-container)
3. **[Install](docs/Install.md)**
1. [Install Docker](docs/Install.md#1-install-docker)
1. [Linux](docs/Install.md#1-1-linux)
2. [Windows](docs/Install.md#1-2-windows)
3. [OSX](docs/Install.md#1-3-osx)
1. [Linux](docs/Install.md#11-linux)
2. [Windows](docs/Install.md#12-windows)
3. [OSX](docs/Install.md#13-osx)
2. [Install Devilbox](#2-install-devilbox)
4. **[Update](docs/Update.md)**
1. [TL;DR](docs/Update.md#1-tl-dr)
Expand Down Expand Up @@ -385,24 +392,31 @@ The devilbox documentation consists of the following main sections.
9. **[Backups](docs/Backups.md)**
1. [Info](docs/Backups.md#1-info)
2. [MySQL](docs/Backups.md#2-mysql)
1. [MySQL Database Backup](docs/Backups.md#2-1-mysql-database-backup)
2. [MySQL Database Restore](docs/Backups.md#2-2-mysql-database-restore)
1. [MySQL Database Backup](docs/Backups.md#21-mysql-database-backup)
2. [MySQL Database Restore](docs/Backups.md#22-mysql-database-restore)
3. [PostgreSQL](docs/Backups.md#3-postgresql)
1. [PostgreSQL Database Backup](docs/Backups.md#3-1-postgresql-database-backup)
2. [PostgreSQL Database Restore](docs/Backups.md#3-1-postgresql-database-restore)
1. [PostgreSQL Database Backup](docs/Backups.md#31-postgresql-database-backup)
2. [PostgreSQL Database Restore](docs/Backups.md#31-postgresql-database-restore)
4. [MongoDB](docs/Backups.md#4-mongodb)
1. [MongoDB Database Backup](docs/Backups.md#4-1-mongodb-database-backup)
2. [MongoDB Database Restore](docs/Backups.md#4-1-mongodb-database-restore)
1. [MongoDB Database Backup](docs/Backups.md#41-mongodb-database-backup)
2. [MongoDB Database Restore](docs/Backups.md#41-mongodb-database-restore)
10. **[Examples](docs/Examples.md)**
1. [Introduction](docs/Examples.md#1-introduction)
2. [Setup CakePHP](docs/Examples.md#2-setup-cakephp)
3. [Setup Drupal](docs/Examples.md#3-setup-drupal)
4. [Setup Laravel](docs/Examples.md#4-setup-laravel)
5. [Setup Phalcon](docs/Examples.md#5-setup-phalcon)
6. [Setup Symfony](docs/Examples.md#6-setup-symfony)
7. [Setup Wordpress](docs/Examples.md#7-setup-wordpress)
8. [Setup Yii](docs/Examples.md#8-setup-yii)
9. [Setup Zend](docs/Examples.md#9-setup-zend)
1. [Framework/CMS tools](docs/Examples.md#11-framework-cms-tools)
2. [Code analysis tools](docs/Examples.md#12-code-analysis-tools)
2. [Project setup](docs/Examples.md#2-project-setup)
1. [Setup CakePHP](docs/Examples.md#21-setup-cakephp)
2. [Setup Drupal](docs/Examples.md#22-setup-drupal)
3. [Setup Laravel](docs/Examples.md#23-setup-laravel)
4. [Setup Phalcon](docs/Examples.md#24-setup-phalcon)
5. [Setup Symfony](docs/Examples.md#25-setup-symfony)
6. [Setup Wordpress](docs/Examples.md#26-setup-wordpress)
7. [Setup Yii](docs/Examples.md#27-setup-yii)
8. [Setup Zend](docs/Examples.md#28-setup-zend)
3. [Code analysis](docs/Examples.md#3-code-analysis)
1. [awesome-ci](docs/Examples.md#31-awesome-ci)
2. [phpcs](docs/Examples.md#32-phpcs)
3. [eslint](docs/Examples.md#33-eslint)
11. **[Technical](docs/Technical.md)**
1. [Networking](docs/Technical.md#1-networking)
2. [Ports and forwarding](docs/Technical.md#2-ports-and-forwarding)
Expand Down
Empty file added bash/README.md
Empty file.
14 changes: 14 additions & 0 deletions bash/bashrc.sh-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Bashrc folder
#
# 1. This folder will be mounted to /etc/bashrc-devilbox.d
# 2. All files ending by *.sh will be sourced by bash automatically
# for the devilbox and root user.
#


# Add your custom vimrc and always load it with vim.
# Also make sure you add vimrc to this folder.
alias vim='vim -u /etc/bashrc-devilbox.d/vimrc



9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
##
- WILDCARD_DOMAIN=${TLD_SUFFIX:-loc}
- WILDCARD_ADDRESS=172.16.238.11
- BIND_DNS_RESOLVER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
- DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}

dns:
- 127.0.0.1
Expand Down Expand Up @@ -181,6 +181,13 @@ services:
# to overwrite the default PHP configuration
- ${DEVILBOX_PATH}/cfg/${PHP_SERVER}:/etc/php-custom.d:ro

# Mount devilbox user-defined *.so files in order
# to load custom PHP modules
- ${DEVILBOX_PATH}/mod/${PHP_SERVER}:/usr/lib64/php/custom-modules:ro

# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d

# Mount custom mass virtual hosting
# (configured in /etc/${HTTPD_SERVER}/02-vhost-mass.conf)
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd
Expand Down
22 changes: 11 additions & 11 deletions docs/Backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ There are many different options to backup your MySQL database including some fo

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the backup
devilbox@php-7.1.6 in /shared/httpd $ mysqldump-secure
Expand Down Expand Up @@ -209,7 +209,7 @@ To find out more about the configuration and options of mysqldump-secure, visit

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the backup
devilbox@php-7.1.6 in /shared/httpd $ mysqldump -h mysql -u root -p my_db_name > /shared/backups/mysql/my_db_name.sql
Expand Down Expand Up @@ -239,7 +239,7 @@ In order to restore or import mysql databases on the command line, you need to u

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ mysql -h mysql -u root -p my_db_name < /shared/backups/mysql/my_db_name.sql
Expand All @@ -249,7 +249,7 @@ devilbox@php-7.1.6 in /shared/httpd $ mysql -h mysql -u root -p my_db_name < /sh

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ zcat /shared/backups/mysql/my_db_name.sql.gz | mysql -h mysql -u root -p my_db_name
Expand All @@ -259,7 +259,7 @@ devilbox@php-7.1.6 in /shared/httpd $ zcat /shared/backups/mysql/my_db_name.sql.

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ tar xzOf /shared/backups/mysql/my_db_name.sql.tar.gz | mysql -h mysql -u root -p my_db_name
Expand All @@ -284,7 +284,7 @@ devilbox@php-7.1.6 in /shared/httpd $ tar xzOf /shared/backups/mysql/my_db_name.

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ pg_dump -h pgsql -U postgres -W my_db_name > /shared/backups/pgsql/my_db_name.sql
Expand All @@ -308,7 +308,7 @@ In order to restore or import PostgreSQL databases on the command line, you need

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ psql -h pgsql -U postgres -W my_db_name < /shared/backups/pgsql/my_db_name.sql
Expand All @@ -318,7 +318,7 @@ devilbox@php-7.1.6 in /shared/httpd $ psql -h pgsql -U postgres -W my_db_name <

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ zcat /shared/backups/pgsql/my_db_name.sql.gz | psql -h pgsql -U postgres -W my_db_name
Expand All @@ -328,7 +328,7 @@ devilbox@php-7.1.6 in /shared/httpd $ zcat /shared/backups/pgsql/my_db_name.sql.

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the import
devilbox@php-7.1.6 in /shared/httpd $ tar xzOf /shared/backups/pgsql/my_db_name.sql.tar.gz | psql -h pgsql -U postgres -W my_db_name
Expand All @@ -349,7 +349,7 @@ devilbox@php-7.1.6 in /shared/httpd $ tar xzOf /shared/backups/pgsql/my_db_name.

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the dump into /shared/backups/mongo
devilbox@php-7.1.6 in /shared/httpd $ mongodump --out /shared/backups/mongo
Expand All @@ -365,7 +365,7 @@ To find out more about the configuration and options of mongodump, visit its pro

```shell
# Enter the Container
host> ./bash.sh
host> ./shell.sh

# Start the restore/import from /shared/backups/mongo
devilbox@php-7.1.6 in /shared/httpd $ mongorestore /shared/backups/mongo
Expand Down
Loading

0 comments on commit 2dbb2df

Please sign in to comment.