$error, 'host' => $host, 'succ' => $succ ); $host = \devilbox\Httpd::getIpAddress($GLOBALS['HTTPD_HOST_NAME']); $succ = \devilbox\Httpd::testConnection($error, $host); $connection['Httpd'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = 'random.loc'; $succ = \devilbox\Httpd::testConnection($error, $host); $connection['Httpd'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); // ---- MYSQL ---- if ($avail_mysql) { $host = $GLOBALS['MYSQL_HOST_NAME']; $succ = \devilbox\Mysql::testConnection($error, $host, 'root', loadClass('Docker')->getEnv('MYSQL_ROOT_PASSWORD')); $connection['MySQL'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = \devilbox\Mysql::getIpAddress($GLOBALS['MYSQL_HOST_NAME']); $succ = \devilbox\Mysql::testConnection($error, $host, 'root', loadClass('Docker')->getEnv('MYSQL_ROOT_PASSWORD')); $connection['MySQL'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = '127.0.0.1'; $succ = \devilbox\Mysql::testConnection($error, $host, 'root', loadClass('Docker')->getEnv('MYSQL_ROOT_PASSWORD')); $connection['MySQL'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); } // ---- PGSQL ---- if ($avail_pgsql) { $host = $GLOBALS['PGSQL_HOST_NAME']; $succ = \devilbox\Pgsql::testConnection($error, $host, loadClass('Docker')->getEnv('PGSQL_ROOT_USER'), loadClass('Docker')->getEnv('PGSQL_ROOT_PASSWORD')); $connection['PgSQL'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = \devilbox\Pgsql::getIpAddress($GLOBALS['PGSQL_HOST_NAME']); $succ = \devilbox\Pgsql::testConnection($error, $host, loadClass('Docker')->getEnv('PGSQL_ROOT_USER'), loadClass('Docker')->getEnv('PGSQL_ROOT_PASSWORD')); $connection['PgSQL'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = '127.0.0.1'; $succ = \devilbox\Pgsql::testConnection($error, $host, loadClass('Docker')->getEnv('PGSQL_ROOT_USER'), loadClass('Docker')->getEnv('PGSQL_ROOT_PASSWORD')); $connection['PgSQL'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); } // ---- REDIS ---- if ($avail_redis) { $host = $GLOBALS['REDIS_HOST_NAME']; $succ = \devilbox\Redis::testConnection($error, $host); $connection['Redis'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = \devilbox\Redis::getIpAddress($GLOBALS['REDIS_HOST_NAME']); $succ = \devilbox\Redis::testConnection($error, $host); $connection['Redis'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = '127.0.0.1'; $succ = \devilbox\Redis::testConnection($error, $host); $connection['Redis'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); } // ---- MEMCACHED ---- if ($avail_memcd) { $host = $GLOBALS['MEMCD_HOST_NAME']; $succ = \devilbox\Memcd::testConnection($error, $host); $connection['Memcached'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = \devilbox\Memcd::getIpAddress($GLOBALS['MEMCD_HOST_NAME']); $succ = \devilbox\Memcd::testConnection($error, $host); $connection['Memcached'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); $host = '127.0.0.1'; $succ = \devilbox\Memcd::testConnection($error, $host); $connection['Memcached'][$host] = array( 'error' => $error, 'host' => $host, 'succ' => $succ ); } /************************************************************* * Test Health *************************************************************/ $HEALTH_TOTAL = 0; $HEALTH_FAILS = 0; foreach ($connection as $docker) { foreach ($docker as $conn) { if (!$conn['succ']) { $HEALTH_FAILS++; } $HEALTH_TOTAL++; } } $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL); /********************************************************************************* * * F U N C T I O N S * *********************************************************************************/ function getCirle($name) { switch ($name) { case 'php': $class = 'bg-info'; $version = loadClass('Php')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Php')->getName(); break; case 'httpd': $class = 'bg-info'; $version = loadClass('Httpd')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Httpd')->getName(); break; case 'httpd': $class = 'bg-info'; $version = loadClass('Httpd')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Httpd')->getName(); break; case 'mysql': $class = 'bg-warning'; $version = loadClass('Mysql')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Mysql')->getName(); break; case 'pgsql': $class = 'bg-warning'; $version = loadClass('Pgsql')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Pgsql')->getName(); break; case 'redis': $class = 'bg-danger'; $version = loadClass('Redis')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Redis')->getName(); break; case 'memcd': $class = 'bg-danger'; $version = loadClass('Memcd')->getVersion(); $available = $GLOBALS['avail_'.$name]; $name = loadClass('Memcd')->getName(); break; default: $available = false; $version = ''; break; } $style = 'color:black;'; $version = '('.$version.')'; if (!$available) { $class = ''; $style = 'background-color:gray;'; $version = ' '; } $circle = '
'. '
'. '
'. '
'. '

'.$name.'
'.$version.'
'. '
'. '
'. '
'. '
'; return $circle; } /********************************************************************************* * * H T M L * *********************************************************************************/ ?>
Version
Devilbox ()
Health
     %
Base Stack
SQL Stack
NoSQL Stack
PHP Container Setup
Settings
uid getUid(); ?>
gid getGid(); ?>
vHost TLD *.loc
DNS Enabled
Postfix Enabled
Xdebug Enabled
Xdebug Remote 192.168.0.215
Xdebug Port 9000
Tools
composer 3.23
drush 8
drush-console 8
git 3.2
npm 3.85
PHP Container Status

The PHP Docker can connect to the following services via the specified hostnames and IP addresses.

$docker): ?> '.$conn['host']; ?> '.$conn['host'].'
'.$conn['error']; ?>
Service Hostname / IP
connect
Networking
Docker Hostname IP
php
httpd
mysql
pgsql
redis
memcached
Ports
Docker Host port Docker port
php - 9000
httpd getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_HTTPD');?> 80
mysql getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_MYSQL');?> 3306
pgsql getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_PGSQL');?> 5432
redis getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_REDIS');?> 6379
memcached getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_MEMCACHED');?> 11211
Socket volumes
Host Volume Docker Docker path
vol_mysql_sock php /tmp/mysql
mysql /tmp/mysql
vol_pqsql_sock php -
pgsql /var/run/postgresql
Data mounts
Docker Host path Docker path
php getEnv('HOST_PATH_HTTPD_DATADIR'); ?> /shared/httpd
httpd getEnv('HOST_PATH_HTTPD_DATADIR'); ?> /shared/httpd
mysql getEnv('HOST_PATH_MYSQL_DATADIR').'/'.loadClass('Docker')->getEnv('MYSQL_SERVER'); ?> /var/lib/mysql
pgsql getEnv('HOST_PATH_PGSQL_DATADIR').'/'.loadClass('Docker')->getEnv('PGSQL_SERVER'); ?> /var/lib/postgresql/data/pgdata
redis - -
memcached - -
Config mounts
Docker Host path Docker path
php ./cfg/getEnv('PHP_SERVER'); ?> /etc/php-custom.d
httpd - -
mysql ./cfg/getEnv('MYSQL_SERVER'); ?> /etc/mysql/conf.d
pgsql - -
redis - -
memcached - -
Log mounts
Docker Host path Docker path
php ./log/getEnv('PHP_SERVER'); ?> /var/log/php
httpd ./log/getEnv('HTTPD_SERVER'); ?> /var/log/getEnv('HTTPD_SERVER'); ?>
mysql ./log/getEnv('MYSQL_SERVER'); ?> /var/log/mysql
pgsql ./log/pgsql-getEnv('PGSQL_SERVER'); ?> /var/log/postgresql
redis ./log/redis-getEnv('REDIS_SERVER'); ?> /var/log/redis
memcached ./log/memcached-getEnv('MEMCACHED_SERVER'); ?> /var/log/memcached