$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.'.loadClass('Php')->getTldSuffix();
$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
);
}
// ---- BIND ----
if ($avail_dns) {
$host = $GLOBALS['DNS_HOST_NAME'];
$succ = \devilbox\Dns::testConnection($error, $host);
$connection['Bind'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = \devilbox\Dns::getIpAddress($GLOBALS['DNS_HOST_NAME']);
$succ = \devilbox\Dns::testConnection($error, $host);
$connection['Bind'][$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 'dns':
$class = 'bg-info';
$version = loadClass('Dns')->getVersion();
$available = $GLOBALS['avail_'.$name];
$name = loadClass('Dns')->getName();
break;
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 '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
*
*********************************************************************************/
?>
PHP Container Setup
You can also enter the php container and work from inside. The following is available inside the container:
Settings |
uid |
getUid(); ?> |
gid |
getGid(); ?> |
vHost TLD |
*.getTldSuffix(); ?> |
DNS |
EnabledOffline |
Postfix |
getEnv('ENABLE_MAIL') ? 'Enabled' : 'No Disabled';?> |
Xdebug |
getEnv('PHP_XDEBUG_ENABLE') == 0) ? '' : $Docker->getEnv('PHP_XDEBUG_ENABLE'); ?>
PHP_config('xdebug.remote_enable')): ?>
PHP_config('xdebug.remote_enable') == 1 ? 'Yes' : 'No'; ?>
not installed.env file setting differs from custom php .ini file '; ?>
PHP_config('xdebug.remote_enable'); ?>
|
Xdebug Remote |
getEnv('PHP_XDEBUG_REMOTE_HOST') == $Docker->PHP_config('xdebug.remote_host')): ?>
PHP_config('xdebug.remote_host'); ?>
not installed.env file setting differs from custom php .ini file '; ?>
PHP_config('xdebug.remote_host'); ?>
|
Xdebug Port |
getEnv('PHP_XDEBUG_REMOTE_PORT') == $Docker->PHP_config('xdebug.remote_port')): ?>
PHP_config('xdebug.remote_port'); ?>
not installed.env file setting differs from custom php .ini file '; ?>
PHP_config('xdebug.remote_port'); ?>
|
Tools |
composer |
getComposerVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> |
drush |
getDrushVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> |
drush-console |
getDrushConsoleVersion()) === false) {echo 'not installed';}else{echo $version;}; ?> |
git |
getGitVersion()) === 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;}; ?> |
PHP Container Status
The PHP Docker can connect to the following services via the specified hostnames and IP addresses.
Service |
Hostname / IP |
$docker): ?>
connect |
'.$conn['host']; ?>
'.$conn['host'].'
'.$conn['error']; ?>
|
|
Networking
Docker |
Hostname |
IP |
php |
|
|
httpd |
|
|
mysql |
|
|
pgsql |
|
|
redis |
|
|
memcached |
|
|
bind |
|
|
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 |
bind |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_BIND');?>/tcp
getEnv('LOCAL_LISTEN_ADDR').loadClass('Docker')->getEnv('HOST_PORT_BIND');?>/udp
|
53/tcp 53/udp |
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 |
- |
- |
bind |
- |
- |
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 |
- |
- |
bind |
- |
- |
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 |
bind |
- |
- |