From 1ad6de7e4ca1e341d1c21cb5f7b540fe0c6b697c Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 16:51:49 +0200 Subject: [PATCH 01/28] REL-0.12 Attach new nginx Docker container --- .../bin/apache-2.2/fix-virtual-docroot.php | 3 - .../bin/apache-2.4/fix-virtual-docroot.php | 3 - .devilbox/etc/apache-2.2/00-defaults.conf | 23 ------ .devilbox/etc/apache-2.2/00-php-fpm.conf | 6 -- .../etc/apache-2.2/01-vhost-default.conf | 40 ---------- .devilbox/etc/apache-2.2/02-vhost-mass.conf | 44 ----------- .devilbox/etc/apache-2.4/00-defaults.conf | 23 ------ .devilbox/etc/apache-2.4/00-php-fpm.conf | 17 ---- .../etc/apache-2.4/01-vhost-default.conf | 42 ---------- .devilbox/etc/apache-2.4/02-vhost-mass.conf | 45 ----------- .devilbox/etc/nginx-mainline/00-defaults.conf | 8 -- .../etc/nginx-mainline/01-vhost-default.conf | 77 ------------------- .../etc/nginx-mainline/02-vhost-mass.conf | 67 ---------------- .devilbox/etc/nginx-stable/00-defaults.conf | 8 -- .../etc/nginx-stable/01-vhost-default.conf | 75 ------------------ .devilbox/etc/nginx-stable/02-vhost-mass.conf | 67 ---------------- docker-compose.yml | 61 ++++++++------- 17 files changed, 30 insertions(+), 579 deletions(-) delete mode 100755 .devilbox/bin/apache-2.2/fix-virtual-docroot.php delete mode 100755 .devilbox/bin/apache-2.4/fix-virtual-docroot.php delete mode 100644 .devilbox/etc/apache-2.2/00-defaults.conf delete mode 100644 .devilbox/etc/apache-2.2/00-php-fpm.conf delete mode 100644 .devilbox/etc/apache-2.2/01-vhost-default.conf delete mode 100644 .devilbox/etc/apache-2.2/02-vhost-mass.conf delete mode 100644 .devilbox/etc/apache-2.4/00-defaults.conf delete mode 100644 .devilbox/etc/apache-2.4/00-php-fpm.conf delete mode 100644 .devilbox/etc/apache-2.4/01-vhost-default.conf delete mode 100644 .devilbox/etc/apache-2.4/02-vhost-mass.conf delete mode 100644 .devilbox/etc/nginx-mainline/00-defaults.conf delete mode 100644 .devilbox/etc/nginx-mainline/01-vhost-default.conf delete mode 100644 .devilbox/etc/nginx-mainline/02-vhost-mass.conf delete mode 100644 .devilbox/etc/nginx-stable/00-defaults.conf delete mode 100644 .devilbox/etc/nginx-stable/01-vhost-default.conf delete mode 100644 .devilbox/etc/nginx-stable/02-vhost-mass.conf diff --git a/.devilbox/bin/apache-2.2/fix-virtual-docroot.php b/.devilbox/bin/apache-2.2/fix-virtual-docroot.php deleted file mode 100755 index e2b6fc13d..000000000 --- a/.devilbox/bin/apache-2.2/fix-virtual-docroot.php +++ /dev/null @@ -1,3 +0,0 @@ - - ServerName localhost - ServerAlias 127.0.0.1 - ServerAlias 172.16.238.* - ServerAlias httpd - - ServerAdmin root@localhost - - ErrorLog /var/log/apache-2.2/devilbox-error.log - CustomLog /var/log/apache-2.2/devilbox-access.log combined - - DirectoryIndex index.php index.html - - DocumentRoot "/var/www/default/htdocs" - - DirectoryIndex index.php index.html - - AllowOverride All - Options All - - RewriteEngine on - RewriteBase / - - Order allow,deny - Allow from all - - - - SetHandler server-status - - Order allow,deny - Allow from all - - - diff --git a/.devilbox/etc/apache-2.2/02-vhost-mass.conf b/.devilbox/etc/apache-2.2/02-vhost-mass.conf deleted file mode 100644 index 45b6eb122..000000000 --- a/.devilbox/etc/apache-2.2/02-vhost-mass.conf +++ /dev/null @@ -1,44 +0,0 @@ -## -## Default Mass Virtual Host -## - - - - # Get the server name from the Host: header - UseCanonicalName Off - - ServerName localhost - ServerAlias *.* - ServerAdmin root@localhost - - # Required for DNS checking - SetEnvIf Origin "http(s)?://(domain1.org|localhost|127.0.0.1|httpd)$" AccessControlAllowOrigin=$0$1 - Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin - - LogFormat "%V;%h;%l;%u;%t;\"%r\";%>s;%b;\"%{Referer}i\";\"%{User-agent}i\"" vcommon - CustomLog "/var/log/apache-2.2/projects-access.log" vcommon - ErrorLog /var/log/apache-2.2/projects-error.log - - DirectoryIndex index.php index.html - - # When using VirtualDocumentRoot the PHP Env var DOCUMENT_ROOT - # is not filled, so we need to do that manually with a custom script. - VirtualDocumentRoot /shared/httpd/%-2+/htdocs/ - php_admin_value auto_prepend_file /opt/bin/fix-virtual-docroot.php - - # Devilbox API endpoint - Alias "/devilbox-api" "/var/www/default/api/devilbox-api" - - - DirectoryIndex index.php index.html - - AllowOverride All - Options All - - RewriteEngine on - RewriteBase / - - Order allow,deny - Allow from all - - diff --git a/.devilbox/etc/apache-2.4/00-defaults.conf b/.devilbox/etc/apache-2.4/00-defaults.conf deleted file mode 100644 index 3b05f01c7..000000000 --- a/.devilbox/etc/apache-2.4/00-defaults.conf +++ /dev/null @@ -1,23 +0,0 @@ -CustomLog "/var/log/apache-2.4/access_log" combined -ErrorLog "/var/log/apache-2.4/error_log" -LogLevel warn - -AddDefaultCharset UTF-8 - -# No DNS -HostnameLookups Off -# -Timeout 60 -KeepAlive On -KeepAliveTimeout 10 -MaxKeepAliveRequests 100 -# -# -EnableMMAP Off -EnableSendfile Off -# -# -# -# -XSendFile On -XSendFilePath /shared/httpd diff --git a/.devilbox/etc/apache-2.4/00-php-fpm.conf b/.devilbox/etc/apache-2.4/00-php-fpm.conf deleted file mode 100644 index 6d0f57fa5..000000000 --- a/.devilbox/etc/apache-2.4/00-php-fpm.conf +++ /dev/null @@ -1,17 +0,0 @@ -#### PHP-FPM config #### - -# enablereuse -# Defining a worker will improve performance -# And in this case, re-use the worker (dependent on support from the fcgi application) -# If you have enough idle workers, this would only improve the performance marginally -# -# enablereuse requires Apache 2.4.11 or later -# - - Require all granted - # Pick one of the following approaches - # Use the standard TCP socket - SetHandler "proxy:fcgi://php:9000" - # If your version of httpd is 2.4.9 or newer (or has the back-ported feature), you can use the unix domain socket - #SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/:9000" - diff --git a/.devilbox/etc/apache-2.4/01-vhost-default.conf b/.devilbox/etc/apache-2.4/01-vhost-default.conf deleted file mode 100644 index 0fe252bb9..000000000 --- a/.devilbox/etc/apache-2.4/01-vhost-default.conf +++ /dev/null @@ -1,42 +0,0 @@ -## -## Default Host for http://localhost -## - - - - ServerName localhost - ServerAlias 127.0.0.1 - ServerAlias 172.16.238.* - ServerAlias httpd - - ServerAdmin root@localhost - - ErrorLog /var/log/apache-2.4/devilbox-error.log - CustomLog /var/log/apache-2.4/devilbox-access.log combined - - DirectoryIndex index.php index.html - - DocumentRoot "/var/www/default/htdocs" - - DirectoryIndex index.php index.html - - AllowOverride All - Options All - - RewriteEngine on - RewriteBase / - - Order allow,deny - Allow from all - Require all granted - - - - SetHandler server-status - - Order allow,deny - Allow from all - Require all granted - - - diff --git a/.devilbox/etc/apache-2.4/02-vhost-mass.conf b/.devilbox/etc/apache-2.4/02-vhost-mass.conf deleted file mode 100644 index 873393f70..000000000 --- a/.devilbox/etc/apache-2.4/02-vhost-mass.conf +++ /dev/null @@ -1,45 +0,0 @@ -## -## Default Mass Virtual Host -## - - - - # Get the server name from the Host: header - UseCanonicalName Off - - ServerName localhost - ServerAlias *.* - ServerAdmin root@localhost - - # Required for DNS checking - SetEnvIf Origin "http(s)?://(domain1.org|localhost|127.0.0.1|httpd)$" AccessControlAllowOrigin=$0$1 - Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin - - LogFormat "%V;%h;%l;%u;%t;\"%r\";%>s;%b;\"%{Referer}i\";\"%{User-agent}i\"" vcommon - CustomLog "/var/log/apache-2.4/projects-access.log" vcommon - ErrorLog /var/log/apache-2.4/projects-error.log - - DirectoryIndex index.php index.html - - # When using VirtualDocumentRoot the PHP Env var DOCUMENT_ROOT - # is not filled, so we need to do that manually with a custom script. - VirtualDocumentRoot /shared/httpd/%-2+/htdocs/ - php_admin_value auto_prepend_file /opt/bin/fix-virtual-docroot.php - - # Devilbox API endpoint - Alias "/devilbox-api" "/var/www/default/api/devilbox-api" - - - DirectoryIndex index.php index.html - - AllowOverride All - Options All - - RewriteEngine on - RewriteBase / - - Order allow,deny - Allow from all - Require all granted - - diff --git a/.devilbox/etc/nginx-mainline/00-defaults.conf b/.devilbox/etc/nginx-mainline/00-defaults.conf deleted file mode 100644 index 0dc048fe6..000000000 --- a/.devilbox/etc/nginx-mainline/00-defaults.conf +++ /dev/null @@ -1,8 +0,0 @@ -charset utf-8; - -send_timeout 60; -keepalive_timeout 10; - -sendfile off; -tcp_nopush on; -tcp_nodelay on; diff --git a/.devilbox/etc/nginx-mainline/01-vhost-default.conf b/.devilbox/etc/nginx-mainline/01-vhost-default.conf deleted file mode 100644 index ce3f5c369..000000000 --- a/.devilbox/etc/nginx-mainline/01-vhost-default.conf +++ /dev/null @@ -1,77 +0,0 @@ -## -## Default Host for http://localhost -## - -server { - listen 80 default_server; - server_name _; - server_name localhost; - server_name 127.0.0.1; - server_name httpd; - server_name 172.16.238.*; - - # Root directive - root /var/www/default/htdocs; - index index.php; - - access_log /var/log/nginx-mainline/devilbox-access.log main; - error_log /var/log/nginx-mainline/devilbox-error.log warn; - - # Devilbox httpd info/status - location /devilbox-httpd-status { - stub_status on; - access_log off; - } - - # Devilbox API endpoint - location ~ /devilbox-api/ { - root /var/www/default/api/; - index status.json; - - # Allow cross-domain requests to this domain - # Used to validate if client DNS is setup correctly - if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) { - add_header "Access-Control-Allow-Origin" "$http_origin"; - } - } - - # Front-controller pattern as recommended by the nginx docs - location / { - try_files $uri $uri/ /index.php; - } - - # PHP FPM - location ~ \.php?$ { - # PHP.INI: - # --------------------------- - # // Find this: - # cgi.fix_pathinfo=1 - # // Replace with: - # cgi.fix_pathinfo=0 - - try_files $uri = 404; - include fastcgi_params; - - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_split_path_info ^(.+\.php)(.*)$; - - #### FPM Server - fastcgi_pass php:9000; - - fastcgi_index index.php; - fastcgi_intercept_errors on; - } - - - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - location ~ /\.ht { - deny all; - } - - # disallow access to git configs path - location ~ /\.git { - deny all; - } -} diff --git a/.devilbox/etc/nginx-mainline/02-vhost-mass.conf b/.devilbox/etc/nginx-mainline/02-vhost-mass.conf deleted file mode 100644 index 090ac3991..000000000 --- a/.devilbox/etc/nginx-mainline/02-vhost-mass.conf +++ /dev/null @@ -1,67 +0,0 @@ -## -## Default Mass Virtual Host -## - -server { - listen 80; - server_name ~^(?.+)\.[a-zA-Z]+$; - - # Root directive - root /shared/httpd/$domain/htdocs/; - index index.php; - - access_log /var/log/nginx-mainline/projects-access.log main; - error_log /var/log/nginx-mainline/projects-error.log warn; - - # Devilbox API endpoint - location ~ /devilbox-api/ { - root /var/www/default/api/; - index status.json; - access_log off; - - # Allow cross-domain requests to this domain - # Used to validate if client DNS is setup correctly - if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) { - add_header "Access-Control-Allow-Origin" "$http_origin"; - } - } - - # Front-controller pattern as recommended by the nginx docs - location / { - try_files $uri $uri/ /index.php$is_args$args; - } - - # PHP FPM - location ~ \.php?$ { - - # PHP.INI: - # --------------------------- - # // Find this: - # cgi.fix_pathinfo=1 - # // Replace with: - # cgi.fix_pathinfo=0 - - try_files $uri = 404; - include fastcgi_params; - - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_split_path_info ^(.+\.php)(.*)$; - - #### SOCKET - fastcgi_pass php:9000; - - fastcgi_index index.php; - fastcgi_intercept_errors on; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - location ~ /\.ht { - deny all; - } - - # disallow access to git configs path - location ~ /\.git { - deny all; - } -} diff --git a/.devilbox/etc/nginx-stable/00-defaults.conf b/.devilbox/etc/nginx-stable/00-defaults.conf deleted file mode 100644 index 0dc048fe6..000000000 --- a/.devilbox/etc/nginx-stable/00-defaults.conf +++ /dev/null @@ -1,8 +0,0 @@ -charset utf-8; - -send_timeout 60; -keepalive_timeout 10; - -sendfile off; -tcp_nopush on; -tcp_nodelay on; diff --git a/.devilbox/etc/nginx-stable/01-vhost-default.conf b/.devilbox/etc/nginx-stable/01-vhost-default.conf deleted file mode 100644 index 933f21108..000000000 --- a/.devilbox/etc/nginx-stable/01-vhost-default.conf +++ /dev/null @@ -1,75 +0,0 @@ -## -## Default Host for http://localhost -## - -server { - listen 80 default_server; - server_name _; - server_name localhost; - server_name 127.0.0.1; - server_name httpd; - server_name 172.16.238.*; - - # Root directive - root /var/www/default/htdocs; - index index.php; - - access_log /var/log/nginx-stable/devilbox-access.log main; - error_log /var/log/nginx-stable/devilbox-error.log warn; - - # Devilbox httpd info/status - location /devilbox-httpd-status { - stub_status on; - access_log off; - } - - # Devilbox API endpoint - location ~ /devilbox-api/ { - root /var/www/default/api/; - index status.json; - - # Allow cross-domain requests to this domain - # Used to validate if client DNS is setup correctly - if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) { - add_header "Access-Control-Allow-Origin" "$http_origin"; - } - } - - # Front-controller pattern as recommended by the nginx docs - location / { - try_files $uri $uri/ /index.php; - } - - # PHP FPM - location ~ \.php?$ { - # PHP.INI: - # --------------------------- - # // Find this: - # cgi.fix_pathinfo=1 - # // Replace with: - # cgi.fix_pathinfo=0 - - try_files $uri = 404; - include fastcgi_params; - - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_split_path_info ^(.+\.php)(.*)$; - - #### FPM Server - fastcgi_pass php:9000; - - fastcgi_index index.php; - fastcgi_intercept_errors on; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - location ~ /\.ht { - deny all; - } - - # disallow access to git configs path - location ~ /\.git { - deny all; - } -} diff --git a/.devilbox/etc/nginx-stable/02-vhost-mass.conf b/.devilbox/etc/nginx-stable/02-vhost-mass.conf deleted file mode 100644 index e5720fb8f..000000000 --- a/.devilbox/etc/nginx-stable/02-vhost-mass.conf +++ /dev/null @@ -1,67 +0,0 @@ -## -## Default Mass Virtual Host -## - -server { - listen 80; - server_name ~^(?.+)\.[a-zA-Z]+$; - - # Root directive - root /shared/httpd/$domain/htdocs/; - index index.php; - - access_log /var/log/nginx-stable/projects-access.log main; - error_log /var/log/nginx-stable/projects-error.log warn; - - # Devilbox API endpoint - location ~ /devilbox-api/ { - root /var/www/default/api/; - index status.json; - access_log off; - - # Allow cross-domain requests to this domain - # Used to validate if client DNS is setup correctly - if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) { - add_header "Access-Control-Allow-Origin" "$http_origin"; - } - } - - # Front-controller pattern as recommended by the nginx docs - location / { - try_files $uri $uri/ /index.php$is_args$args; - } - - # PHP FPM - location ~ \.php?$ { - - # PHP.INI: - # --------------------------- - # // Find this: - # cgi.fix_pathinfo=1 - # // Replace with: - # cgi.fix_pathinfo=0 - - try_files $uri = 404; - include fastcgi_params; - - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_split_path_info ^(.+\.php)(.*)$; - - #### SOCKET - fastcgi_pass php:9000; - - fastcgi_index index.php; - fastcgi_intercept_errors on; - } - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - location ~ /\.ht { - deny all; - } - - # disallow access to git configs path - location ~ /\.git { - deny all; - } -} diff --git a/docker-compose.yml b/docker-compose.yml index da32693b2..8ad8b6958 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -171,9 +171,11 @@ services: # HOST-DIRECTORY : DOCKER-DIRECTORY # Mount custom intranet - # (configured in /etc/${HTTPD_SERVER}/01-vhost-default.conf) - ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro + # Mount custom mass virtual hosting + - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd + # Mount logs - ${DEVILBOX_PATH}/log/${PHP_SERVER}:/var/log/php @@ -194,10 +196,6 @@ services: # 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 - depends_on: - bind @@ -205,8 +203,8 @@ services: # HTTPD # ---------------------------------------- httpd: - image: cytopia/${HTTPD_SERVER:-nginx-stable}:latest - #image: cytopia/${HTTPD_SERVER:-nginx-stable}:0.9 + #image: cytopia/${HTTPD_SERVER:-nginx-stable}:latest + image: cytopia/${HTTPD_SERVER:-nginx-stable}:release-0.10 restart: always # Manually build via `docker-compose build` @@ -219,13 +217,33 @@ services: ## ## Debug? ## - - DEBUG_COMPOSE_ENTRYPOINT + - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT} + - DEBUG_RUNTIME=${DEBUG_COMPOSE_ENTRYPOINT} ## ## Adjust timezone ## - TIMEZONE + ## + ## UserID and GroupID + ## + - NEW_UID + - NEW_GID + + ## + ## Disable default vhost? + ## + - VHOST_MAIN_DISABLE=${DEVILBOX_UI_DISABLE} + + ## + ## Enable Mass Vhosts + ## + - MASS_VHOST_ENABLE=1 + - MASS_VHOST_TLD=.${TLD_SUFFIX} + - MASS_VHOST_DIR_SUFFIX=${HTTPD_DOCROOT_DIR} + - MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR} + ## ## PHP-FPM Remote Server ## @@ -233,12 +251,6 @@ services: - PHP_FPM_SERVER_ADDR=php - PHP_FPM_SERVER_PORT=9000 - ## Tell the webserver to look into this directory - ## for additional configuration files. - ## - ## @see volumes:: - ./etc/${HTTPD_SERVER}:/etc/${HTTPD_SERVER} - - CUSTOM_HTTPD_CONF_DIR=/etc/${HTTPD_SERVER} - ports: # ---- Format: ---- # [HOST-ADDR : ] HOST-PORT : DOCKER-PORT @@ -252,27 +264,14 @@ services: # ---- Format: ---- # HOST-DIRECTORY : DOCKER-DIRECTORY - # Custom scripts/binaries required for httpd server vhost - # configuration to work. - # (configured in /etc/${HTTPD_SERVER}/02-vhost-mass.conf) - - ${DEVILBOX_PATH}/.devilbox/bin/${HTTPD_SERVER}:/opt/bin:ro - - # Mount user-defined httpd configuration files - # @see environment::CUSTOM_HTTPD_CONF_DIR for how this - # is added in httpd server - - ${DEVILBOX_PATH}/.devilbox/etc/${HTTPD_SERVER}:/etc/${HTTPD_SERVER}:ro - # Mount custom intranet - # (configured in /etc/${HTTPD_SERVER}/01-vhost-default.conf) - ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro - # Mount user-defined httpd log - # @see ./etc/${HTTPD_SERVER}/*.conf for log defines - - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER} - # Mount custom mass virtual hosting - # (configured in /etc/${HTTPD_SERVER}/02-vhost-mass.conf) - - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:ro + - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd + + # Mount logs + - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER} depends_on: - bind From c58b1e3db30659333a07770a46fc745291aee577 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 16:58:24 +0200 Subject: [PATCH 02/28] REL-0.12 Add option to disable devilbox Intranet --- docker-compose.yml | 2 +- env-example | 55 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8ad8b6958..3cfa74f96 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -234,7 +234,7 @@ services: ## ## Disable default vhost? ## - - VHOST_MAIN_DISABLE=${DEVILBOX_UI_DISABLE} + - MAIN_VHOST_DISABLE=${DEVILBOX_UI_DISABLE} ## ## Enable Mass Vhosts diff --git a/env-example b/env-example index f5d898556..7d5805ea3 100644 --- a/env-example +++ b/env-example @@ -16,7 +16,7 @@ ### ### 1: Yes ### 0: No -DEBUG_COMPOSE_ENTRYPOINT=0 +DEBUG_COMPOSE_ENTRYPOINT=1 ### @@ -70,20 +70,6 @@ LOCAL_LISTEN_ADDR=127.0.0.1: TLD_SUFFIX=loc -### -### TLD_SUFFIX domains are checked if they are set in the -### host computer /etc/hosts or available via attached DNS server. -### Timeout is done on vhosts.php (intranet) via ajax calls. -### In order to keep performance, set this to a low value. -### DNS checks might not succeed in time on slow machines. -### If DNS is valid, but timeout is expired, set this to a higher value. -### -### DNS_CHECK_TIMEOUT value is how many seconds to time out -### Default is to timeout after 1 second (DNS_CHECK_TIMEOUT=1) -### -DNS_CHECK_TIMEOUT=1 - - ### ### Set your user id and group id ### @@ -102,6 +88,28 @@ NEW_GID=1000 TIMEZONE=Europe/Berlin + + +################################################################################ +### +### INTRANET SETTINGS +### +################################################################################ + +### +### TLD_SUFFIX domains are checked if they are set in the +### host computer /etc/hosts or available via attached DNS server. +### Timeout is done on vhosts.php (intranet) via ajax calls. +### In order to keep performance, set this to a low value. +### DNS checks might not succeed in time on slow machines. +### If DNS is valid, but timeout is expired, set this to a higher value. +### +### DNS_CHECK_TIMEOUT value is how many seconds to time out +### Default is to timeout after 1 second (DNS_CHECK_TIMEOUT=1) +### +DNS_CHECK_TIMEOUT=1 + + ### ### Devilbox UI Password protection enable/disable (1/0) ### @@ -132,6 +140,16 @@ DEVILBOX_UI_PROTECT=0 DEVILBOX_UI_PASSWORD=password +### +### Disable the Devilbox Intranet? +### +### Example: +### DEVILBOX_UI_PROTECT=1 +### DEVILBOX_UI_PROTECT=0 +### +DEVILBOX_UI_DISABLE=1 + + ################################################################################ ### @@ -331,7 +349,7 @@ PHP_XDEBUG_ENABLE=1 # Your local port (your computer host [not the docker]) # where your ide/editor is listening for xdebug connections. -PHP_XDEBUG_REMOTE_PORT=9000 +PHP_XDEBUG_REMOTE_PORT=9001 # Your local IP address (your computer host [not the docker]) # where your ide/editor is listening for xdebug connections. @@ -352,6 +370,11 @@ PHP_XDEBUG_REMOTE_HOST=192.168.0.215 HOST_PORT_HTTPD=80 +HTTPD_DOCROOT_DIR="htdocs" + +HTTPD_TEMPLATE_DIR=".devilbox" + + ################################################################################ ### From 69bb14288dbbac18a8656999c809d6e3af3bc550 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 17:43:41 +0200 Subject: [PATCH 03/28] REL-0.12 Enable devilbox intranet by default --- env-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-example b/env-example index 7d5805ea3..28a6da7f8 100644 --- a/env-example +++ b/env-example @@ -147,7 +147,7 @@ DEVILBOX_UI_PASSWORD=password ### DEVILBOX_UI_PROTECT=1 ### DEVILBOX_UI_PROTECT=0 ### -DEVILBOX_UI_DISABLE=1 +DEVILBOX_UI_DISABLE=0 From 769b34c3e6484f922ad7b0fb9c2715b4287ada60 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 17:44:31 +0200 Subject: [PATCH 04/28] REL-0.12 Set correct httpd status page --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3cfa74f96..b0d1a165b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -235,6 +235,8 @@ services: ## Disable default vhost? ## - MAIN_VHOST_DISABLE=${DEVILBOX_UI_DISABLE} + - MAIN_VHOST_STATUS_ENABLE=1 + - MAIN_VHOST_STATUS_ALIAS=/devilbox-httpd-status ## ## Enable Mass Vhosts From 9752af136337e4024c82df356bf0f16031188313 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 19:39:38 +0200 Subject: [PATCH 05/28] REL-0.12 Add directories to globally configure web servers --- .gitignore | 6 ++++++ cfg/apache-2.2/.keepme | 0 cfg/apache-2.2/defaults.conf-example | 25 ++++++++++++++++++++++++ cfg/apache-2.4/.keepme | 0 cfg/apache-2.4/defaults.conf-example | 25 ++++++++++++++++++++++++ cfg/nginx-mainline/.keepme | 0 cfg/nginx-mainline/defaults.conf-example | 18 +++++++++++++++++ cfg/nginx-stable/.keepme | 0 cfg/nginx-stable/defaults.conf-example | 18 +++++++++++++++++ docker-compose.yml | 3 +++ 10 files changed, 95 insertions(+) create mode 100644 cfg/apache-2.2/.keepme create mode 100644 cfg/apache-2.2/defaults.conf-example create mode 100644 cfg/apache-2.4/.keepme create mode 100644 cfg/apache-2.4/defaults.conf-example create mode 100644 cfg/nginx-mainline/.keepme create mode 100644 cfg/nginx-mainline/defaults.conf-example create mode 100644 cfg/nginx-stable/.keepme create mode 100644 cfg/nginx-stable/defaults.conf-example diff --git a/.gitignore b/.gitignore index 593424192..5408f4475 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,12 @@ /data/ /backups/ +# Ignore custom HTTPD configs +/cfg/apache-2.2/*.conf +/cfg/apache-2.4/*.conf +/cfg/nginx-stable/*.conf +/cfg/nginx-mainline/*.conf + # Ignore custom MySQL configs /cfg/mysql-5.5/*.cnf /cfg/mysql-5.6/*.cnf diff --git a/cfg/apache-2.2/.keepme b/cfg/apache-2.2/.keepme new file mode 100644 index 000000000..e69de29bb diff --git a/cfg/apache-2.2/defaults.conf-example b/cfg/apache-2.2/defaults.conf-example new file mode 100644 index 000000000..e638815fb --- /dev/null +++ b/cfg/apache-2.2/defaults.conf-example @@ -0,0 +1,25 @@ +# +# Apache 2.2 configuration overwrites +# +# Make sure this file ends by *.conf, otherwise +# the configuration is not sourced by nginx. +# +# The below settings are just examples. +# Copy them, remove them or reset them. +# + +AddDefaultCharset UTF-8 + +# No DNS +HostnameLookups Off + +Timeout 60 +KeepAlive On +KeepAliveTimeout 10 +MaxKeepAliveRequests 100 + +EnableMMAP Off +EnableSendfile Off + +XSendFile On +XSendFilePath /shared/httpd diff --git a/cfg/apache-2.4/.keepme b/cfg/apache-2.4/.keepme new file mode 100644 index 000000000..e69de29bb diff --git a/cfg/apache-2.4/defaults.conf-example b/cfg/apache-2.4/defaults.conf-example new file mode 100644 index 000000000..3eb5dd5d4 --- /dev/null +++ b/cfg/apache-2.4/defaults.conf-example @@ -0,0 +1,25 @@ +# +# Apache 2.4 configuration overwrites +# +# Make sure this file ends by *.conf, otherwise +# the configuration is not sourced by nginx. +# +# The below settings are just examples. +# Copy them, remove them or reset them. +# + +AddDefaultCharset UTF-8 + +# No DNS +HostnameLookups Off + +Timeout 60 +KeepAlive On +KeepAliveTimeout 10 +MaxKeepAliveRequests 100 + +EnableMMAP Off +EnableSendfile Off + +XSendFile On +XSendFilePath /shared/httpd diff --git a/cfg/nginx-mainline/.keepme b/cfg/nginx-mainline/.keepme new file mode 100644 index 000000000..e69de29bb diff --git a/cfg/nginx-mainline/defaults.conf-example b/cfg/nginx-mainline/defaults.conf-example new file mode 100644 index 000000000..28cff2744 --- /dev/null +++ b/cfg/nginx-mainline/defaults.conf-example @@ -0,0 +1,18 @@ +# +# Nginx (mainline) configuration overwrites +# +# Make sure this file ends by *.conf, otherwise +# the configuration is not sourced by nginx. +# +# The below settings are just examples. +# Copy them, remove them or reset them. +# + +charset utf-8; + +send_timeout 60; +keepalive_timeout 10; + +sendfile off; +tcp_nopush on; +tcp_nodelay on; diff --git a/cfg/nginx-stable/.keepme b/cfg/nginx-stable/.keepme new file mode 100644 index 000000000..e69de29bb diff --git a/cfg/nginx-stable/defaults.conf-example b/cfg/nginx-stable/defaults.conf-example new file mode 100644 index 000000000..837eae8ee --- /dev/null +++ b/cfg/nginx-stable/defaults.conf-example @@ -0,0 +1,18 @@ +# +# Nginx (stable) configuration overwrites +# +# Make sure this file ends by *.conf, otherwise +# the configuration is not sourced by nginx. +# +# The below settings are just examples. +# Copy them, remove them or reset them. +# + +charset utf-8; + +send_timeout 60; +keepalive_timeout 10; + +sendfile off; +tcp_nopush on; +tcp_nodelay on; diff --git a/docker-compose.yml b/docker-compose.yml index b0d1a165b..ffc942a5c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -272,6 +272,9 @@ services: # Mount custom mass virtual hosting - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd + # Mount custom web server config directory + - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/${HTTPD_SERVER}.d + # Mount logs - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER} From 4ad3596daac373a37b83ea94c1a43587f9e5afe7 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 19:53:31 +0200 Subject: [PATCH 06/28] REL-0.12 #128 Source environment variables --- docker-compose.yml | 11 +++++++++++ env-example | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ffc942a5c..61b23fbe6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -73,6 +73,17 @@ services: #context: https://github.com/cytopia/docker-${PHP_SERVER}.git#1 # context: https://github.com/cytopia/docker-${PHP_SERVER}.git + + ## + ## Custom variables + ## + ## Source all variables defined in .env + ## This makes any custom variable available in each PHP/HHVM container + ## + env_file: + - ./.env + + environment: ## diff --git a/env-example b/env-example index 28a6da7f8..bedd085d2 100644 --- a/env-example +++ b/env-example @@ -8,6 +8,8 @@ ### ### No need to rebuild any dockers! ### +### For custom variables, scroll to the bottom +### ### @@ -483,3 +485,25 @@ HOST_PORT_BIND=1053 ### You can also add DNS servers from your LAN (if any are available) ### BIND_DNS_RESOLVER=8.8.8.8,8.8.4.4 + + + +################################################################################ +### +### 11. Custom variables +### +################################################################################ + +### +### Any variable defined in this file will be available +### as environment variables to your PHP/HHV Docker container. +### +### This might be useful to set application environment and retriev +### them via: +### + +### +### Example: +### would produce: 'some value' +### +#Foo=some value From d8e60644e8575bb73c6daba1af1526efd1cabd0d Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 19:56:28 +0200 Subject: [PATCH 07/28] REL-0.12 Remove deprecates from docker-compose.yml --- docker-compose.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 61b23fbe6..21387f6c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,12 +68,6 @@ services: #image: cytopia/${PHP_SERVER:-php-fpm-7.0}:0.11 restart: always - # Manually build via `docker-compose build` - #build: - #context: https://github.com/cytopia/docker-${PHP_SERVER}.git#1 - # context: https://github.com/cytopia/docker-${PHP_SERVER}.git - - ## ## Custom variables ## @@ -83,7 +77,6 @@ services: env_file: - ./.env - environment: ## @@ -218,11 +211,6 @@ services: image: cytopia/${HTTPD_SERVER:-nginx-stable}:release-0.10 restart: always - # Manually build via `docker-compose build` - #build: - #context: https://github.com/cytopia/docker-${HTTPD_SERVER}.git#1 - # context: https://github.com/cytopia/docker-${HTTPD_SERVER}.git - environment: ## @@ -301,11 +289,6 @@ services: image: cytopia/${MYSQL_SERVER:-mariadb-10.1}:latest #image: cytopia/${MYSQL_SERVER:-mariadb-10.1}:0.9 - # Manually build via `docker-compose build` - #build: - #context: https://github.com/cytopia/docker-${MYSQL_SERVER}.git#1 - # context: https://github.com/cytopia/docker-${MYSQL_SERVER}.git - environment: ## From bf0bc75b9035ea47466d2dc1d73b5035c275f1ff Mon Sep 17 00:00:00 2001 From: cytopia Date: Wed, 27 Sep 2017 14:42:42 +0200 Subject: [PATCH 08/28] REL-0.12 Evade cross domain requests via POST --- .devilbox/www/htdocs/vhosts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devilbox/www/htdocs/vhosts.php b/.devilbox/www/htdocs/vhosts.php index b2cd9fdc8..70c4f90c2 100644 --- a/.devilbox/www/htdocs/vhosts.php +++ b/.devilbox/www/htdocs/vhosts.php @@ -125,7 +125,7 @@ function checkDns(vhost) { //console.log(vhost); } } - xhttp.open('GET', 'http://'+vhost+'.getTldSuffix();?>/devilbox-api/status.json', true); + xhttp.open('POST', 'http://'+vhost+'.getTldSuffix();?>/devilbox-api/status.json', true); xhttp.send(); // Timeout to abort in 1 second From 32add6d2a001712b4718ecb020152c5a42c48b99 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 28 Sep 2017 16:30:00 +0200 Subject: [PATCH 09/28] REL-0.12 Use custom doc root directory in Intranet --- .devilbox/www/htdocs/index.php | 12 ++++++++++-- .devilbox/www/htdocs/vhosts.php | 4 +--- .devilbox/www/include/lib/container/Httpd.php | 7 ++++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index b9f0c212d..11fc9d148 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -351,6 +351,14 @@ gid getGid(); ?> + + vHost docroot dir + getEnv('HTTPD_DOCROOT_DIR'); ?> + + + vHost config dir + getEnv('HTTPD_TEMPLATE_DIR'); ?> + vHost TLD *.getTldSuffix(); ?> @@ -762,8 +770,8 @@ httpd - - - - + ./cfg/getEnv('HTTPD_SERVER'); ?> + /etc/httpd-custom.d diff --git a/.devilbox/www/htdocs/vhosts.php b/.devilbox/www/htdocs/vhosts.php index 70c4f90c2..75b940528 100644 --- a/.devilbox/www/htdocs/vhosts.php +++ b/.devilbox/www/htdocs/vhosts.php @@ -39,7 +39,7 @@ - getEnv('HOST_PATH_HTTPD_DATADIR');?>//htdocs + getEnv('HOST_PATH_HTTPD_DATADIR');?>//getEnv('HTTPD_DOCROOT_DIR');?>     @@ -80,12 +80,10 @@ function updateStatus(vhost) { error = this.responseText; if (error.length && error.match(/^error/)) { - console.log(error); el_valid.className += ' bg-danger'; el_valid.innerHTML = 'ERR'; el_href.innerHTML = error; } else if (error.length && error.match(/^warning/)) { - console.log(error); el_valid.className += ' bg-warning'; el_valid.innerHTML = 'WARN'; el_href.innerHTML = error.replace('warning', ''); diff --git a/.devilbox/www/include/lib/container/Httpd.php b/.devilbox/www/include/lib/container/Httpd.php index b92c57109..a8209430a 100644 --- a/.devilbox/www/include/lib/container/Httpd.php +++ b/.devilbox/www/include/lib/container/Httpd.php @@ -23,15 +23,16 @@ class Httpd extends BaseClass implements BaseInterface */ public function checkVirtualHost($vhost) { - $htdocs = $this->_docRoot . DIRECTORY_SEPARATOR . $vhost . DIRECTORY_SEPARATOR . 'htdocs'; + $htdocs = loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR'); + $docroot = $this->_docRoot . DIRECTORY_SEPARATOR . $vhost . DIRECTORY_SEPARATOR . $htdocs; $domain = $vhost . '.' . $this->getTldSuffix(); $url = 'http://'.$domain; $error = array(); // 1. Check htdocs folder - if (!$this->_is_valid_dir($htdocs)) { + if (!$this->_is_valid_dir($docroot)) { $error[] = 'error'; - $error[] = 'Missing htdocs directory in: '.loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vhost.'/'; + $error[] = 'Missing '.$htdocs.' directory in: '.loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vhost.'/'; } // 2. Check internal DNS server From 0cb54d34efcf12d0e350abff7d3ac9a654e3eaf6 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 28 Sep 2017 16:30:51 +0200 Subject: [PATCH 10/28] REL-0.12 Remove quotes from variable values --- env-example | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/env-example b/env-example index bedd085d2..dab08e5eb 100644 --- a/env-example +++ b/env-example @@ -371,10 +371,25 @@ PHP_XDEBUG_REMOTE_HOST=192.168.0.215 ### HOST_PORT_HTTPD=80 +### +### Document Root Subdirectory +### +### In your project directory, which subfolder should +### serve your files? +### +### When changing this value, restart the devilbox. +### +HTTPD_DOCROOT_DIR=htdocs -HTTPD_DOCROOT_DIR="htdocs" - -HTTPD_TEMPLATE_DIR=".devilbox" +### +### Per vHost Config Subdirectory +### +### In your project directory, which subfolder should +### hold apache, nginx templates for a customized vhost? +### +### When changing this value, restart the devilbox. +### +HTTPD_TEMPLATE_DIR=.devilbox From f5b03f22b7cdea64d90aaa97dfaa6e7d3f34b5a0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 28 Sep 2017 16:31:33 +0200 Subject: [PATCH 11/28] REL-0.12 Make document root dir dynamic --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 21387f6c8..f28c93d0b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -242,7 +242,7 @@ services: ## - MASS_VHOST_ENABLE=1 - MASS_VHOST_TLD=.${TLD_SUFFIX} - - MASS_VHOST_DIR_SUFFIX=${HTTPD_DOCROOT_DIR} + - MASS_VHOST_DOCROOT=${HTTPD_DOCROOT_DIR} - MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR} ## @@ -272,7 +272,7 @@ services: - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd # Mount custom web server config directory - - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/${HTTPD_SERVER}.d + - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d # Mount logs - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER} From fb193aba2067976331c63f28ea50a0b041393afc Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 1 Oct 2017 18:59:11 +0200 Subject: [PATCH 12/28] DVL-012 Switch httpd Docker namespace --- docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f28c93d0b..65c98b01a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -207,8 +207,7 @@ services: # HTTPD # ---------------------------------------- httpd: - #image: cytopia/${HTTPD_SERVER:-nginx-stable}:latest - image: cytopia/${HTTPD_SERVER:-nginx-stable}:release-0.10 + image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.12 restart: always environment: From 20383fee48d3e129a134edf350ee5b4f3e08809b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 1 Oct 2017 19:16:09 +0200 Subject: [PATCH 13/28] REL-0.12 Update update-docker.sh to use new httpd namespace --- update-docker.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update-docker.sh b/update-docker.sh index 5d771c894..399ff2c0d 100755 --- a/update-docker.sh +++ b/update-docker.sh @@ -33,10 +33,10 @@ docker pull cytopia/hhvm-latest:${TAG} ### HTTPD ### TAG="$( grep '^[[:space:]]*image:.*\${HTTPD_SERVER' "${CWD}/docker-compose.yml" | sed 's/^.*://g' )" -docker pull cytopia/nginx-stable:${TAG} -docker pull cytopia/nginx-mainline:${TAG} -docker pull cytopia/apache-2.2:${TAG} -docker pull cytopia/apache-2.4:${TAG} +docker pull devilbox/nginx-stable:${TAG} +docker pull devilbox/nginx-mainline:${TAG} +docker pull devilbox/apache-2.2:${TAG} +docker pull devilbox/apache-2.4:${TAG} ### ### MYSQL From 3990d2de71639d1192a13f9142d4a71652e1d9cc Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 2 Oct 2017 12:42:29 +0200 Subject: [PATCH 14/28] REL-0.12 Speed up frontpage by using Ajax requests --- .devilbox/www/htdocs/_ajax_callback.php | 92 ++++++++++++++++++++- .devilbox/www/htdocs/index.php | 58 ++++++++++--- .devilbox/www/include/lib/container/Php.php | 2 +- 3 files changed, 135 insertions(+), 17 deletions(-) diff --git a/.devilbox/www/htdocs/_ajax_callback.php b/.devilbox/www/htdocs/_ajax_callback.php index fc9c33047..3e17387e7 100644 --- a/.devilbox/www/htdocs/_ajax_callback.php +++ b/.devilbox/www/htdocs/_ajax_callback.php @@ -3,12 +3,17 @@ if (loadClass('Helper')->isLoggedIn()) { + // + // ?database= + // if (isset($_GET['database'])) { + // &type=mysql if (isset($_GET['type']) && $_GET['type'] == 'mysql') { echo json_encode(array( 'size' => (string)loadClass('Mysql')->getDBSize($_GET['database']), 'table' => (string)loadClass('Mysql')->getTableCount($_GET['database']) )); + // &type=postgres } else if (isset($_GET['type']) && $_GET['type'] == 'postgres') { $schema = isset($_GET['schema']) ? $_GET['schema'] : ''; echo json_encode(array( @@ -16,12 +21,93 @@ 'table' => (string)loadClass('Pgsql')->getTableCount($_GET['database'], $schema) )); } - } else if (isset($_GET['vhost'])) { + } + + // + // ?vhost= + // + else if (isset($_GET['vhost'])) { echo loadClass('Httpd')->checkVirtualHost($_GET['vhost']); - } else { + } + + + // + // ?software= + // + else if (isset($_GET['software'])) { + $no = 'not installed'; + $software = array(); + + if ($_GET['software'] == 'composer') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getComposerVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'drupalc') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getDrupalConsoleVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'drush') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getDrushVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'git') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getGitVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'laravel') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getLaravelVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'mds') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getMdsVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'node') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getNodeVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'npm') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getNpmVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'phalcon') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getPhalconVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'symfony') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getPhalconVersion()) !== false) ? $version : $no + )); + } + else if ($_GET['software'] == 'wpcli') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getSymfonyVersion()) !== false) ? $version : $no + )); + } else { + echo json_encode(array($_GET['software'] => 'unknown software')); + } + } + + // + // WRONG REQUEST + // + else { loadClass('Helper')->redirect('/'); } +} -} else { +// +// Not logged in +// +else { loadClass('Helper')->redirect('/'); } diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index 11fc9d148..87ed2836b 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -30,6 +30,7 @@ $error = null; // ---- HTTPD (required) ---- + $host = $GLOBALS['HTTPD_HOST_NAME']; $succ = loadClass('Httpd')->canConnect($error, $host); $connection['Httpd'][$host] = array( @@ -51,7 +52,6 @@ 'host' => $host, 'succ' => $succ ); - // ---- MYSQL ---- if ($avail_mysql) { $host = $GLOBALS['MYSQL_HOST_NAME']; @@ -127,6 +127,7 @@ ); } + // ---- MEMCACHED ---- if ($avail_memcd) { $host = $GLOBALS['MEMCD_HOST_NAME']; @@ -417,47 +418,47 @@ composer - getComposerVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + drupal-console - getDrushConsoleVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + drush - getDrushVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + git - getGitVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + - Laravell installer - getLaravelVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + Laravel installer + mysqldump-secure - getMdsVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + node - getNodeVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + npm - getNpmVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + Phalcon devtools - getPhalconVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + Symfony installer - getSymfonyVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + Wordpress cli - getWpcliVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> + @@ -910,6 +911,37 @@ (function() { // your page initialization code here // the DOM will be available here + + /** + * Update installed tool versions. + * Ajax method is faster for loading the front page + * @param string app Name of the tool + */ + function updateVersions(app) { + var xhttp = new XMLHttpRequest(); + + xhttp.onreadystatechange = function() { + var elem = document.getElementById('app_'+app); + + if (this.readyState == 4 && this.status == 200) { + json = JSON.parse(this.responseText); + elem.innerHTML = json[app]; + } + }; + xhttp.open('GET', '_ajax_callback.php?software='+app, true); + xhttp.send(); + } + updateVersions('composer'); + updateVersions('drupalc'); + updateVersions('drush'); + updateVersions('git'); + updateVersions('laravel'); + updateVersions('mds'); + updateVersions('node'); + updateVersions('npm'); + updateVersions('phalcon'); + updateVersions('symfony'); + updateVersions('wpcli'); })(); diff --git a/.devilbox/www/include/lib/container/Php.php b/.devilbox/www/include/lib/container/Php.php index e79e65f85..682c118b2 100644 --- a/.devilbox/www/include/lib/container/Php.php +++ b/.devilbox/www/include/lib/container/Php.php @@ -50,7 +50,7 @@ public function getDrushVersion() $output = loadClass('Helper')->exec('drush --version', $output); return loadClass('Helper')->egrep('/[0-9.]+/', $output); } - public function getDrushConsoleVersion() + public function getDrupalConsoleVersion() { $output = loadClass('Helper')->exec('drupal --version | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g"', $output); return loadClass('Helper')->egrep('/[0-9.]+[-rc0-9.]*/', $output); From 5d11a09866093dc8818a235a19b1d578154e0870 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 2 Oct 2017 13:00:48 +0200 Subject: [PATCH 15/28] REL-0.12 Fix version getter --- .devilbox/www/htdocs/_ajax_callback.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/htdocs/_ajax_callback.php b/.devilbox/www/htdocs/_ajax_callback.php index 3e17387e7..f002edab9 100644 --- a/.devilbox/www/htdocs/_ajax_callback.php +++ b/.devilbox/www/htdocs/_ajax_callback.php @@ -85,12 +85,12 @@ } else if ($_GET['software'] == 'symfony') { echo json_encode(array( - $_GET['software'] => (($version = loadClass('Php')->getPhalconVersion()) !== false) ? $version : $no + $_GET['software'] => (($version = loadClass('Php')->getSymfonyVersion()) !== false) ? $version : $no )); } else if ($_GET['software'] == 'wpcli') { echo json_encode(array( - $_GET['software'] => (($version = loadClass('Php')->getSymfonyVersion()) !== false) ? $version : $no + $_GET['software'] => (($version = loadClass('Php')->getWpcliVersion()) !== false) ? $version : $no )); } else { echo json_encode(array($_GET['software'] => 'unknown software')); From 8ad5b4ef611e2dd731c9a64f678efc4687ef2a93 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 10:32:23 +0200 Subject: [PATCH 16/28] REL-0.12 Default to listen on all Interfaces --- env-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-example b/env-example index dab08e5eb..f47439f24 100644 --- a/env-example +++ b/env-example @@ -51,7 +51,7 @@ DEVILBOX_PATH=. ### b.) If an IP is specified, note the trailing colon ':' ### LOCAL_LISTEN_ADDR=127.0.0.1: ### -LOCAL_LISTEN_ADDR=127.0.0.1: +LOCAL_LISTEN_ADDR= ### From 54bddc820aef2e27ff178217b2d0e4d03c7dc992 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:07:18 +0200 Subject: [PATCH 17/28] REL-0.12 Doc: How to disable the Intranet --- docs/Configure.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/Configure.md b/docs/Configure.md index b5e9538f6..2dd583123 100644 --- a/docs/Configure.md +++ b/docs/Configure.md @@ -77,6 +77,7 @@ Configure | 5. [Intranet settings](#5-intranet-settings) 1. [DNS check timeout](#51-dns-check-timeout) 2. [Password protection](#52-password-protection) + 3. [Disable Intranet](#53-disable-intranet) 6. [Host computer](#6-host-computer) 1. [/etc/hosts](#61-etchosts) 2. [Auto-DNS](#62-auto-dns) @@ -873,6 +874,14 @@ If you wish, you can password-protect the devilbox intranet (not the vhost proje > However, the devilbox intranet might give away too much information, what other people should not see, such as databases or others. > In that case, you should enable password protection. +#### 5.3 Disable Intranet + +| `.env` file variable name | Default | Note | +|---------------------------|---------|------| +| DEVILBOX_UI_DISABLE | `0` | Enable or disable devilbox's Intranet completely. | + +If you wish, you can disable the built-in intranet completely. Set this variable to `1` which will remove the vhost that servers the Intranet. All that will be left are your custom project based virtual hosts. + ## 6. Host computer From 2b5336c342e4877cd3d3fd882ca7c182cf70a3c5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:28:42 +0200 Subject: [PATCH 18/28] REL-0.12 Doc: How to change the htdocs directory name --- docs/Configure.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/Configure.md b/docs/Configure.md index 2dd583123..738a46ada 100644 --- a/docs/Configure.md +++ b/docs/Configure.md @@ -33,6 +33,7 @@ Configure | 3. [Project settings](#3-project-settings) 1. [Project domain](#31-project-domain) 2. [Project path](#32-project-path) + 3. [Project htdocs directory](#33-project-htdocs directory) 4. [Container settings](#4-container-settings) 1. [General](#41-general) 1. [Timezone](#411-timezone) @@ -293,6 +294,23 @@ $ docker-compose rm -f $ docker-compose up -d ``` +#### 3.3 Project htdocs directory + +| `.env` file variable name | Default | Note | +|---------------------------|---------|------| +| HTTPD_DOCROOT_DIR | `htdocs` | A sub directory inside your project directory from which the web server will serve your files.
The full path to the docuement root would be: `${HOST_PATH_HTTPD_DATADIR}//${HTTPD_DOCROOT_DIR}` | + +If you rather would use a directory called `www`, just change it to this. Be aware that this will affect all your projects. + +**Note:** When changing this value, you must restart the devilbox. + +```shell +# Stop the container +$ docker-compose stop + +# Start your stack +$ docker-compose up -d +``` ## 4. Container settings From 352a8d3b400f02fc6f96844dcf8a9a6d811136d1 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:38:39 +0200 Subject: [PATCH 19/28] REL-0.12 Doc: How to customize per project vhost --- docs/Configure.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/Configure.md b/docs/Configure.md index 738a46ada..10d6e7183 100644 --- a/docs/Configure.md +++ b/docs/Configure.md @@ -49,6 +49,7 @@ Configure | 3. [Apache / Nginx](#43-apache--nginx) 1. [Select Httpd version](#431-select-httpd-version) 2. [Host port](#432-host-port) + 3. [Customize the vhost configuration](#433-customize-the-vhost-configuration) 4. [MySQL](#44-mysql) 1. [Select MySQL version](#441-select-mysql-version) 2. [Root password](#442-root-password) @@ -541,6 +542,17 @@ By default the webserver will listen on port 80 (on your Host computer). You can If you also want to change the listening address (default: 127.0.0.1) to something else, see above or search this document for `LOCAL_LISTEN_ADDRESS`. +##### 4.3.3 Customize the vhost configuration + +| `.env` file variable name | Default | Note | +|---------------------------|---------|------| +| HTTPD_TEMPLATE_DIR | `.devilbox`| A sub directory inside your project directory where the web server will look for web server templates in order to load a custom configuration for this specific project. | + +If no such directory exists or no templates are available, the chosen web server will use the standard configuration for this virtual host. You can however overwrite each virtual host with custom settings by adding **[vhost-gen](https://github.com/devilbox/vhost-gen)** templates. + +Copy all available templates from [vhost-gen templates directory](https://github.com/devilbox/vhost-gen/tree/master/etc/templates) to a a sub directory in your projects dir (By default `.devilbox/`) and adjust those template files to your needs. + + #### 4.4 MySQL ##### 4.4.1 Select MySQL version From 6f00608fba5f904b7a152ecf423f95cd2ac64c76 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:43:57 +0200 Subject: [PATCH 20/28] REL-0.12 Doc: #128 How to add custom environment variables --- docs/Configure.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/Configure.md b/docs/Configure.md index 10d6e7183..20ba00bc2 100644 --- a/docs/Configure.md +++ b/docs/Configure.md @@ -46,6 +46,7 @@ Configure | 4. [HHVM](#424-hhvm) 5. [Custom PHP modules](#425-custom-php-modules) 6. [Customize bash and other tools](#426-customize-bash-and-other-tools) + 7. [Custom environment variables](#427-custom-environment-variables) 3. [Apache / Nginx](#43-apache--nginx) 1. [Select Httpd version](#431-select-httpd-version) 2. [Host port](#432-host-port) @@ -519,6 +520,20 @@ alias vim='vim -u /etc/bashrc-devilbox.d/my-vimrc' The next time you open `vim` within the PHP/HHVM docker container, it will automatically source your `my-vimrc`. +##### 4.2.7 Custom environment variables + +If you projects require custom environment variables to be available to PHP or HHVM, you can simply add any variable to the `.env` file. All of them are automatically available to the container. + +If your application requires are variable to determine if it is run under development or production, for example: `APPLICATION_ENV`, you can just add this to the `.env` file: + +``` +$ cat .env + +... +APPLICATION_ENV=1 +``` + + #### 4.3 Apache / Nginx ##### 4.3.1 Select Httpd version From 5bd184c6099bcf51a330c9926fda809edeb89ab5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:49:16 +0200 Subject: [PATCH 21/28] REL-0.12 Doc: How to customize the web server configuration --- cfg/README.md | 2 +- ...f-example => devilbox-custom.conf-example} | 0 ...f-example => devilbox-custom.conf-example} | 0 ...f-example => devilbox-custom.conf-example} | 0 ...f-example => devilbox-custom.conf-example} | 0 docs/Configure.md | 25 +++++++++++++------ 6 files changed, 18 insertions(+), 9 deletions(-) rename cfg/apache-2.2/{defaults.conf-example => devilbox-custom.conf-example} (100%) rename cfg/apache-2.4/{defaults.conf-example => devilbox-custom.conf-example} (100%) rename cfg/nginx-mainline/{defaults.conf-example => devilbox-custom.conf-example} (100%) rename cfg/nginx-stable/{defaults.conf-example => devilbox-custom.conf-example} (100%) diff --git a/cfg/README.md b/cfg/README.md index ccae63862..36fd4b8e1 100644 --- a/cfg/README.md +++ b/cfg/README.md @@ -1,3 +1,3 @@ # Devilbox user-defined settings -Use this folders to add your custom configuration. +Use this folders to add general custom configuration. diff --git a/cfg/apache-2.2/defaults.conf-example b/cfg/apache-2.2/devilbox-custom.conf-example similarity index 100% rename from cfg/apache-2.2/defaults.conf-example rename to cfg/apache-2.2/devilbox-custom.conf-example diff --git a/cfg/apache-2.4/defaults.conf-example b/cfg/apache-2.4/devilbox-custom.conf-example similarity index 100% rename from cfg/apache-2.4/defaults.conf-example rename to cfg/apache-2.4/devilbox-custom.conf-example diff --git a/cfg/nginx-mainline/defaults.conf-example b/cfg/nginx-mainline/devilbox-custom.conf-example similarity index 100% rename from cfg/nginx-mainline/defaults.conf-example rename to cfg/nginx-mainline/devilbox-custom.conf-example diff --git a/cfg/nginx-stable/defaults.conf-example b/cfg/nginx-stable/devilbox-custom.conf-example similarity index 100% rename from cfg/nginx-stable/defaults.conf-example rename to cfg/nginx-stable/devilbox-custom.conf-example diff --git a/docs/Configure.md b/docs/Configure.md index 20ba00bc2..312fb57ef 100644 --- a/docs/Configure.md +++ b/docs/Configure.md @@ -115,30 +115,38 @@ You can get more information here: Inside the devilbox root directory you will find a folder called `cfg/`. This will contain subdirectories in the form of `-`. Those folders will be mounted into the appropriate location into the respective docker container in order to overwrite service configuration. -Currently only MySQL/MariaDB and PHP/HHVM overrides are supported. +Currently only MySQL/MariaDB, PHP/HHVM and Apache/Nginx overrides are supported. The folder structure looks like this: ``` cfg/ + apache-2.2/ + apache-2.4/ + nginx-mainline/ + nginx-stable/ + hhvm-latest/ + php-fpm-5.4/ + php-fpm-5.5/ + php-fpm-5.6/ + php-fpm-7.0/ + php-fpm-7.1/ + php-fpm-7.2/ + + mariadb-5.5/ mariadb-10.0/ mariadb-10.1/ mariadb-10.2/ mariadb-10.3/ - mariadb-5.5/ + mysql-5.5/ mysql-5.6/ mysql-5.7/ mysql-8.0/ + percona-5.5/ percona-5.6/ percona-5.7/ - php-fpm-5.4/ - php-fpm-5.5/ - php-fpm-5.6/ - php-fpm-7.0/ - php-fpm-7.1/ - php-fpm-7.2/ ``` Each of the folders will contain an example file in the following format: @@ -150,6 +158,7 @@ Only files which have the correct file extensions will be read, all others such * Valid PHP config extension: `.ini` * Valid MySQL config extension: `.cnf` +* Valid Httpd config extension: `.conf` #### 1.3 The devilbox `mod/` directory From c87201db13b43de0dc73098602f1357788f6a886 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:50:09 +0200 Subject: [PATCH 22/28] REL-0.12 Bump version --- .devilbox/www/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 4686e37b9..fe4c89e58 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v0.11'; -$DEVILBOX_DATE = '2017-08-16'; +$DEVILBOX_VERSION = 'v0.12'; +$DEVILBOX_DATE = '2017-10-03'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // From cc0c947d6b11f4c1b0065068d62bcdbdabdb5f31 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 11:58:42 +0200 Subject: [PATCH 23/28] REL-0.12 Remove fixed note about uid/gid --- docs/Configure.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/Configure.md b/docs/Configure.md index 312fb57ef..0a44d0567 100644 --- a/docs/Configure.md +++ b/docs/Configure.md @@ -359,7 +359,6 @@ $ id **Note:** If your Host computers user id and the containers user id do not match, files will have different access rights inside and outside which might result in permission errors like `access denied`. So make sure to set this value. -**Note:** Files created by the webserver such as uploads, tmp and cache files are still created by the webservers user id and you will probably have to `chmod` them. This issues will be addressed shortly and you will also be able to change the uid/gid of the webserver in the next devilbox release. ##### 4.1.2 Group id From f454a032c9fea29f01a2d14a298e80cc033cc77a Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 3 Oct 2017 12:45:37 +0200 Subject: [PATCH 24/28] REL-0.12 Doc: How to setup Joomla --- README.md | 14 +++-- docs/Examples.md | 128 ++++++++++++++++++++++++++------------ docs/FAQ.md | 17 +++-- docs/Quickstart.md | 13 ++-- docs/img/logos/joomla.png | Bin 0 -> 4997 bytes 5 files changed, 114 insertions(+), 58 deletions(-) create mode 100644 docs/img/logos/joomla.png diff --git a/README.md b/README.md index 06629e207..bfcf17127 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,7 @@ As far as tested there are no limitations and you can use any Framework or CMS j [![CakePHP](docs/img/logos/cake.png)](https://cakephp.org) [![Drupal](docs/img/logos/drupal.png)](https://www.drupal.org) +[![Joomla](docs/img/logos/joomla.png)](https://www.joomla.org) [![Laravel](docs/img/logos/laravel.png)](https://laravel.com) [![Phalcon](docs/img/logos/phalcon.png)](https://phalconphp.com) [![Symfony](docs/img/logos/symfony.png)](https://symfony.com) @@ -351,12 +352,13 @@ The devilbox documentation consists of the following main sections. 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. [Setup Joomla](docs/Examples.md#23-setup-joomla) + 4. [Setup Laravel](docs/Examples.md#24-setup-laravel) + 5. [Setup Phalcon](docs/Examples.md#25-setup-phalcon) + 6. [Setup Symfony](docs/Examples.md#26-setup-symfony) + 7. [Setup Wordpress](docs/Examples.md#27-setup-wordpress) + 8. [Setup Yii](docs/Examples.md#28-setup-yii) + 9. [Setup Zend](docs/Examples.md#29-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) diff --git a/docs/Examples.md b/docs/Examples.md index 0bd6a0c91..0c3450f4e 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -24,12 +24,13 @@ Examples | 2. [Project setup](#2-project-setup) 1. [Setup CakePHP](#21-setup-cakephp) 2. [Setup Drupal](#22-setup-drupal) - 3. [Setup Laravel](#23-setup-laravel) - 4. [Setup Phalcon](#24-setup-phalcon) - 5. [Setup Symfony](#25-setup-symfony) - 6. [Setup Wordpress](#26-setup-wordpress) - 7. [Setup Yii](#27-setup-yii) - 8. [Setup Zend](#28-setup-zend) + 3. [Setup Joomla](#23-setup-joomla) + 4. [Setup Laravel](#24-setup-laravel) + 5. [Setup Phalcon](#25-setup-phalcon) + 6. [Setup Symfony](#26-setup-symfony) + 7. [Setup Wordpress](#27-setup-wordpress) + 8. [Setup Yii](#28-setup-yii) + 9. [Setup Zend](#29-setup-zend) 3. [Code analysis](#3-code-analysis) 1. [awesome-ci](#31-awesome-ci) 2. [phpcs](#32-phpcs) @@ -96,19 +97,19 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-cake +devilbox@php-7.0.20 in /shared/httpd $ cd my-cake # 3. Install CakePHP via composer -devilbox@php-7.0.20 in /shared/httpd $ cd my-cake -devilbox@php-7.0.20 in /shared/httpd $ composer create-project --prefer-dist cakephp/app cakephp +devilbox@php-7.0.20 in /shared/httpd/my-cake $ composer create-project --prefer-dist cakephp/app cakephp # 4. Symlink webroot directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s cakephp/webroot/ htdocs +devilbox@php-7.0.20 in /shared/httpd/my-cake $ ln -s cakephp/webroot/ htdocs # 5. Add MySQL datbase -devilbox@php-7.0.20 in /shared/httpd $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_cake;' +devilbox@php-7.0.20 in /shared/httpd/my-cake $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_cake;' # 6. Configure datbase connection -devilbox@php-7.0.20 in /shared/httpd $ vi cakephp/config/app.php +devilbox@php-7.0.20 in /shared/httpd/my-cake $ vi cakephp/config/app.php ``` ```php ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-drupal +devilbox@php-7.0.20 in /shared/httpd $ cd my-drupal # 3. Install Drupal via drush -devilbox@php-7.0.20 in /shared/httpd $ cd my-drupal -devilbox@php-7.0.20 in /shared/httpd $ drush dl drupal +devilbox@php-7.0.20 in /shared/httpd/my-drupal $ drush dl drupal # 4. Symlink Drupal directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s drupal-8.3.3 htdocs +devilbox@php-7.0.20 in /shared/httpd/my-drupal $ ln -s drupal-8.3.3 htdocs ``` **5. DNS record** @@ -191,8 +192,55 @@ Open your browser at http://my-drupal.loc and follow the Drupal installation ste **Note:** For MySQL host choose `127.0.0.1`. +#### 2.3 Setup Joomla + +> **[Official Joomla Documentation](https://docs.joomla.org/J3.x:Installing_Joomla)** + +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: + +1. Enter the PHP container +2. Create a new VirtualHost directory +3. Download and extract Joomla +4. Symlink public directory +5. Setup DNS record +6. Visit http://my-joomla.loc in your browser + +```shell +# 1. Enter the PHP container +host> ./shell.sh + +# 2. Create a new VirtualHost directory +devilbox@php-7.0.20 in /shared/httpd $ mkdir my-joomla +devilbox@php-7.0.20 in /shared/httpd $ cd my-joomla + +# 3. Download and extract Joomla +devilbox@php-7.0.20 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 +devilbox@php-7.0.20 in /shared/httpd/my-joomla $ mkdir joomla/ +devilbox@php-7.0.20 in /shared/httpd/my-joomla $ tar xvfz joomla.tar.gz -C joomla/ -#### 2.3 Setup Laravel + +# 4. Symlink Joomla directory +devilbox@php-7.0.20 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`: +```shell +127.0.0.1 my-joomla.loc +``` + +**6. Open your browser** + +Open your browser at http://my-joomla.loc + +#### 2.4 Setup Laravel > **[Official Laravel Documentation](https://laravel.com/docs/5.4/installation)** @@ -217,13 +265,13 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-laravel +devilbox@php-7.0.20 in /shared/httpd $ cd my-laravel # 3. Install Laravel via laravel -devilbox@php-7.0.20 in /shared/httpd $ cd my-laravel -devilbox@php-7.0.20 in /shared/httpd $ laravel new laravel-project +devilbox@php-7.0.20 in /shared/httpd/my-laravel $ laravel new laravel-project # 4. Symlink public directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s laravel-project/public htdocs +devilbox@php-7.0.20 in /shared/httpd/my-laravel $ ln -s laravel-project/public htdocs ``` **5. DNS record** @@ -238,7 +286,7 @@ If you do not have auto-DNS configured, you will need to add the following line Open your browser at http://my-laravel.loc -#### 2.4 Setup Phalcon +#### 2.5 Setup Phalcon > **[Official Phalcon Documentation](https://docs.phalconphp.com/en/3.2/devtools-usage)** @@ -263,13 +311,13 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-phalcon +devilbox@php-7.0.20 in /shared/httpd $ cd my-phalcon # 3. Install Phalcon via phalcon -devilbox@php-7.0.20 in /shared/httpd $ cd my-phalcon -devilbox@php-7.0.20 in /shared/httpd $ phalcon project phalconphp +devilbox@php-7.0.20 in /shared/httpd/my-phalcon $ phalcon project phalconphp # 4. Symlink public directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s phalconphp/public htdocs +devilbox@php-7.0.20 in /shared/httpd/my-phalcon $ ln -s phalconphp/public htdocs ``` **5. DNS record** @@ -284,7 +332,7 @@ If you do not have auto-DNS configured, you will need to add the following line Open your browser at http://my-phalcon.loc -#### 2.5 Setup Symfony +#### 2.6 Setup Symfony > **[Official Symfony Documentation](https://symfony.com/doc/current/setup.html)** @@ -310,17 +358,17 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-symfony +devilbox@php-7.0.20 in /shared/httpd $ cd my-symfony # 3. Install Symfony via symfony -devilbox@php-7.0.20 in /shared/httpd $ cd my-symfony -devilbox@php-7.0.20 in /shared/httpd $ symfony new symfony +devilbox@php-7.0.20 in /shared/httpd/my-symfony $ symfony new symfony # 4. Symlink web directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s symfony/web htdocs +devilbox@php-7.0.20 in /shared/httpd/my-symfony $ ln -s symfony/web htdocs # 5. Enable Symfony production (app.php) -devilbox@php-7.0.20 in /shared/httpd $ cd symfony/web -devilbox@php-7.0.20 in /shared/httpd $ ln -s app.php index.php +devilbox@php-7.0.20 in /shared/httpd/my-symfony $ cd symfony/web +devilbox@php-7.0.20 in /shared/httpd/my-symfony/symfony/web $ ln -s app.php index.php ``` **6. DNS record** @@ -335,7 +383,7 @@ If you do not have auto-DNS configured, you will need to add the following line Open your browser at http://my-symfony.loc -#### 2.6 Setup Wordpress +#### 2.7 Setup Wordpress > **[Official Wordpress Documentation](https://codex.wordpress.org/Installing_WordPress)** @@ -360,13 +408,13 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-wp +devilbox@php-7.0.20 in /shared/httpd $ cd my-wp # 3. Download Wordpress via git -devilbox@php-7.0.20 in /shared/httpd $ cd my-wp -devilbox@php-7.0.20 in /shared/httpd $ git clone https://github.com/WordPress/WordPress wordpress.git +devilbox@php-7.0.20 in /shared/httpd/my-wp $ git clone https://github.com/WordPress/WordPress wordpress.git # 4. Symlink wordpress git directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s wordpress.git htdocs +devilbox@php-7.0.20 in /shared/httpd/my-wp $ ln -s wordpress.git htdocs ``` **5. DNS record** @@ -381,7 +429,7 @@ If you do not have auto-DNS configured, you will need to add the following line Open your browser at http://my-wp.loc -#### 2.7 Setup Yii +#### 2.8 Setup Yii > **[Official Yii Documentation](http://www.yiiframework.com/doc-2.0/guide-start-installation.html)** @@ -406,13 +454,13 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-yii +devilbox@php-7.0.20 in /shared/httpd $ cd my-yii # 3. Install Yii2 via composer -devilbox@php-7.0.20 in /shared/httpd $ cd my-yii -devilbox@php-7.0.20 in /shared/httpd $ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic yii2-dev +devilbox@php-7.0.20 in /shared/httpd/my-yii $ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic yii2-dev # 4. Symlink web directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s yii2-dev/web htdocs +devilbox@php-7.0.20 in /shared/httpd/my-yii $ ln -s yii2-dev/web htdocs ``` **5. DNS record** @@ -427,7 +475,7 @@ If you do not have auto-DNS configured, you will need to add the following line Open your browser at http://my-yii.loc -#### 2.8 Setup Zend +#### 2.9 Setup Zend > **[Official Zend Documentation](https://docs.zendframework.com/tutorials/getting-started/skeleton-application/)** @@ -452,13 +500,13 @@ host> ./shell.sh # 2. Create a new VirtualHost directory devilbox@php-7.0.20 in /shared/httpd $ mkdir my-zend +devilbox@php-7.0.20 in /shared/httpd $ cd my-zend # 3. Install Zendframework via composer -devilbox@php-7.0.20 in /shared/httpd $ cd my-zend -devilbox@php-7.0.20 in /shared/httpd $ composer create-project --prefer-dist zendframework/skeleton-application zend +devilbox@php-7.0.20 in /shared/httpd/my-zend $ composer create-project --prefer-dist zendframework/skeleton-application zend # 4. Symlink public directory -devilbox@php-7.0.20 in /shared/httpd $ ln -s zend/public htdocs +devilbox@php-7.0.20 in /shared/httpd/my-zend $ ln -s zend/public htdocs ``` **5. DNS record** diff --git a/docs/FAQ.md b/docs/FAQ.md index af5ac997d..7b156b1f8 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -40,6 +40,7 @@ FAQ 3. **[Usage](#3-usage)** - [Does it work with CakePHP?](#does-it-work-with-cakephp) - [Does it work with Drupal?](#does-it-work-with-drupal) + - [Does it work with Joomla?](#does-it-work-with-joomla) - [Does it work with Laravel?](#does-it-work-with-laravel) - [Does it work with PhalconPHP?](#does-it-work-with-phalconphp) - [Does it work with Symfony?](#does-it-work-with-symfony) @@ -160,29 +161,33 @@ Yes, see **[How to setup CakePHP](Examples.md#21-setup-cakephp)**. Yes, see **[How to setup Drupal](Examples.md#22-setup-drupal)**. +#### Does it work with Joomla? + +Yes, see **[How to setup Joomla](Examples.md#23-setup-joomla)**. + #### Does it work with Laravel? -Yes, see **[How to setup Laravel](Examples.md#23-setup-laravel)**. +Yes, see **[How to setup Laravel](Examples.md#24-setup-laravel)**. #### Does it work with PhalconPHP? -Yes, see **[How to setup Phalcon](Examples.md#24-setup-phalcon)**. +Yes, see **[How to setup Phalcon](Examples.md#25-setup-phalcon)**. #### Does it work with Symfony? -Yes, see **[How to setup Symfony](Examples.md#25-setup-symfony)**. +Yes, see **[How to setup Symfony](Examples.md#26-setup-symfony)**. #### Does it work with Wordpress? -Yes, see **[How to setup Wordpress](Examples.md#26-setup-wordpress)**. +Yes, see **[How to setup Wordpress](Examples.md#27-setup-wordpress)**. #### Does it work with Yii? -Yes, see **[How to setup Yii](Examples.md#27-setup-yii)**. +Yes, see **[How to setup Yii](Examples.md#28-setup-yii)**. #### Does it work with Zend Framework? -Yes, see **[How to setup Zend](Examples.md#28-setup-zend)**. +Yes, see **[How to setup Zend](Examples.md#29-setup-zend)**. ## 4. Troubleshooting diff --git a/docs/Quickstart.md b/docs/Quickstart.md index d7a400b88..30b1dd6d0 100644 --- a/docs/Quickstart.md +++ b/docs/Quickstart.md @@ -191,12 +191,13 @@ To quickly find setup instructions for your framework of choice head over to **[ > 2. [Project setup](Examples.md#2-project-setup) > 1. [Setup CakePHP](Examples.md#21-setup-cakephp) > 2. [Setup Drupal](Examples.md#22-setup-drupal) -> 3. [Setup Laravel](Examples.md#23-setup-laravel) -> 4. [Setup Phalcon](Examples.md#24-setup-phalcon) -> 5. [Setup Symfony](Examples.md#25-setup-symfony) -> 6. [Setup Wordpress](Examples.md#26-setup-wordpress) -> 7. [Setup Yii](Examples.md#27-setup-yii) -> 8. [Setup Zend](Examples.md#28-setup-zend) +> 3. [Setup Joomla](Examples.md#23-setup-joomla) +> 4. [Setup Laravel](Examples.md#24-setup-laravel) +> 5. [Setup Phalcon](Examples.md#25-setup-phalcon) +> 6. [Setup Symfony](Examples.md#26-setup-symfony) +> 7. [Setup Wordpress](Examples.md#27-setup-wordpress) +> 8. [Setup Yii](Examples.md#28-setup-yii) +> 9. [Setup Zend](Examples.md#29-setup-zend) ## 6. Enter the PHP Docker container diff --git a/docs/img/logos/joomla.png b/docs/img/logos/joomla.png new file mode 100644 index 0000000000000000000000000000000000000000..d0e298f8178c714f70134634506c00898d188ad5 GIT binary patch literal 4997 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 P00000NkvXXu0mjfWd(W2 literal 0 HcmV?d00001 From bb2288a461804a9ef9f4c6d3965636a82e025087 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 8 Oct 2017 12:17:36 +0200 Subject: [PATCH 25/28] REL-0.12 Update new versions of available Docker container --- .devilbox/www/config.php | 2 +- .travis.yml | 16 +++++-- README.md | 26 +++++------ docker-compose.yml | 98 ++++++++++------------------------------ env-example | 12 ++++- 5 files changed, 60 insertions(+), 94 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index fe4c89e58..a1d2aba2f 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -14,7 +14,7 @@ $DEVILBOX_VERSION = 'v0.12'; -$DEVILBOX_DATE = '2017-10-03'; +$DEVILBOX_DATE = '2017-10-08'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/.travis.yml b/.travis.yml index ccdea91ee..358784fe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -200,15 +200,23 @@ env: - S1=PHP V1=php-fpm-7.1 S2=PGSQL V2=9.6 - S1=PHP V1=php-fpm-7.2 S2=PGSQL V2=9.6 - S1=PHP V1=hhvm-latest S2=PGSQL V2=9.6 + # PHP vs PgSQL 10.0 + - S1=PHP V1=php-fpm-5.4 S2=PGSQL V2=10.0 + - S1=PHP V1=php-fpm-5.5 S2=PGSQL V2=10.0 + - S1=PHP V1=php-fpm-5.6 S2=PGSQL V2=10.0 + - S1=PHP V1=php-fpm-7.0 S2=PGSQL V2=10.0 + - S1=PHP V1=php-fpm-7.1 S2=PGSQL V2=10.0 + - S1=PHP V1=php-fpm-7.2 S2=PGSQL V2=10.0 + - S1=PHP V1=hhvm-latest S2=PGSQL V2=10.0 ### ### Build Matrix definition ### -matrix: - allow_failures: - - env: S1=PHP V1=hhvm-latest S2=HTTPD V2=apache-2.2 - +#matrix: +# allow_failures: +# - env: S1=PHP V1=hhvm-latest S2=HTTPD V2=apache-2.2 +# ### ### Berfore Install diff --git a/README.md b/README.md index bfcf17127..b5d3a6468 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,8 @@ Every single attachable container comes with many different versions. In order t - 2.2 - stable + 2.2 + stable 5.4 5.5 5.5 @@ -89,8 +89,8 @@ Every single attachable container comes with many different versions. In order t 2.8 - 2.4 - mainline + 2.4 + mainline 5.5 5.6 10.0 @@ -120,7 +120,7 @@ Every single attachable container comes with many different versions. In order t 10.2 9.4 - + 4.0 1.4.24 3.4 @@ -145,7 +145,7 @@ Every single attachable container comes with many different versions. In order t 9.6 - 1.4.36 + 1.5.2 @@ -155,7 +155,7 @@ Every single attachable container comes with many different versions. In order t - + 10.0 latest @@ -386,10 +386,10 @@ In order to make sure every combination works with each other, the devilbox inte | 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-bind.svg?branch=master)](https://travis-ci.org/cytopia/docker-bind) [Bind](https://github.com/cytopia/docker-bind) | [![Build Status](https://travis-ci.org/devilbox/docker-apache-2.2.svg?branch=master)](https://travis-ci.org/devilbox/docker-apache-2.2) [Apache 2.2](https://github.com/devilbox/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/devilbox/docker-apache-2.4.svg?branch=master)](https://travis-ci.org/devilbox/docker-apache-2.4) [Apache 2.4](https://github.com/devilbox/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/devilbox/docker-nginx-stable.svg?branch=master)](https://travis-ci.org/devilbox/docker-nginx-stable) [Nginx stable](https://github.com/devilbox/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/devilbox/docker-nginx-mainline.svg?branch=master)](https://travis-ci.org/devilbox/docker-nginx-mainline) [Nginx mainline](https://github.com/devilbox/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-php-fpm-7.2.svg?branch=master)](https://travis-ci.org/cytopia/docker-php-fpm-7.2) [PHP 7.2](https://github.com/cytopia/docker-php-fpm-7.2) | | | [![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) @@ -404,7 +404,7 @@ In order to make sure every combination works with each other, the devilbox inte | [![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.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/docker-library/postgres.svg?branch=master)](https://travis-ci.org/docker-library/postgres/branches) [PgSQL 10.0](https://hub.docker.com/_/postgres/) | | | [![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) | | | | [![Build Status](https://travis-ci.org/cytopia/docker-percona-5.5.svg?branch=master)](https://travis-ci.org/cytopia/docker-percona-5.5) [PerconaDB 5.5](https://github.com/cytopia/docker-percona-5.5) | | | @@ -418,7 +418,7 @@ In order to make sure every combination works with each other, the devilbox inte | Cassandra 2.1 | CouchDB 1.6 | [![Travis CI](https://travis-ci.org/docker-library/memcached.svg?branch=master)](https://travis-ci.org/docker-library/memcached) [latest](https://github.com/docker-library/memcached) | [![build Status](https://travis-ci.org/docker-library/mongo.svg?branch=master)](https://travis-ci.org/docker-library/mongo) [2.8](https://github.com/docker-library/mongo) | [![Travis CI](https://travis-ci.org/docker-library/redis.svg?branch=master)](https://travis-ci.org/docker-library/redis) [2.8](https://github.com/docker-library/redis) | | Cassandra 2.2 | CouchDB 2.0 | | [![build Status](https://travis-ci.org/docker-library/mongo.svg?branch=master)](https://travis-ci.org/docker-library/mongo) [3.0](https://github.com/docker-library/mongo) | [![Travis CI](https://travis-ci.org/docker-library/redis.svg?branch=master)](https://travis-ci.org/docker-library/redis) [3.0](https://github.com/docker-library/redis) | | Cassandra 3.0 | | | [![build Status](https://travis-ci.org/docker-library/mongo.svg?branch=master)](https://travis-ci.org/docker-library/mongo) [3.2](https://github.com/docker-library/mongo) | [![Travis CI](https://travis-ci.org/docker-library/redis.svg?branch=master)](https://travis-ci.org/docker-library/redis) [3.2](https://github.com/docker-library/redis) | -| | | | [![build Status](https://travis-ci.org/docker-library/mongo.svg?branch=master)](https://travis-ci.org/docker-library/mongo) [3.4](https://github.com/docker-library/mongo) | | +| | | | [![build Status](https://travis-ci.org/docker-library/mongo.svg?branch=master)](https://travis-ci.org/docker-library/mongo) [3.4](https://github.com/docker-library/mongo) | [![Travis CI](https://travis-ci.org/docker-library/redis.svg?branch=master)](https://travis-ci.org/docker-library/redis) [4.0](https://github.com/docker-library/redis) | | | | | [![build Status](https://travis-ci.org/docker-library/mongo.svg?branch=master)](https://travis-ci.org/docker-library/mongo) [3.5](https://github.com/docker-library/mongo) | |