isAvailable();
$avail_dns = loadClass('Dns')->isAvailable();
$avail_httpd = loadClass('Httpd')->isAvailable();
$avail_mysql = loadClass('Mysql')->isAvailable();
$avail_pgsql = loadClass('Pgsql')->isAvailable();
$avail_redis = loadClass('Redis')->isAvailable();
$avail_memcd = loadClass('Memcd')->isAvailable();
$avail_mongo = loadClass('Mongo')->isAvailable();
/*************************************************************
* Test Connectivity
*************************************************************/
$connection = array();
$error = null;
// ---- HTTPD (required) ----
$host = $GLOBALS['HTTPD_HOST_NAME'];
$succ = loadClass('Httpd')->canConnect($error, $host);
$connection['Httpd'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Httpd')->getIpAddress();
$succ = loadClass('Httpd')->canConnect($error, $host);
$connection['Httpd'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = 'random.'.loadClass('Httpd')->getTldSuffix();
$succ = loadClass('Httpd')->canConnect($error, $host);
$connection['Httpd'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
// ---- MYSQL ----
if ($avail_mysql) {
$host = $GLOBALS['MYSQL_HOST_NAME'];
$succ = loadClass('Mysql')->canConnect($error, $host, array('user' => 'root', 'pass' => loadClass('Helper')->getEnv('MYSQL_ROOT_PASSWORD')));
$connection['MySQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Mysql')->getIpAddress();
$succ = loadClass('Mysql')->canConnect($error, $host, array('user' => 'root', 'pass' => loadClass('Helper')->getEnv('MYSQL_ROOT_PASSWORD')));
$connection['MySQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
$succ = loadClass('Mysql')->canConnect($error, $host, array('user' => 'root', 'pass' => loadClass('Helper')->getEnv('MYSQL_ROOT_PASSWORD')));
$connection['MySQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- PGSQL ----
if ($avail_pgsql) {
$host = $GLOBALS['PGSQL_HOST_NAME'];
$succ = loadClass('Pgsql')->canConnect($error, $host, array('user' => loadClass('Helper')->getEnv('PGSQL_ROOT_USER'), 'pass' => loadClass('Helper')->getEnv('PGSQL_ROOT_PASSWORD')));
$connection['PgSQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Pgsql')->getIpAddress();
$succ = loadClass('Pgsql')->canConnect($error, $host, array('user' => loadClass('Helper')->getEnv('PGSQL_ROOT_USER'), 'pass' => loadClass('Helper')->getEnv('PGSQL_ROOT_PASSWORD')));
$connection['PgSQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
$succ = loadClass('Pgsql')->canConnect($error, $host, array('user' => loadClass('Helper')->getEnv('PGSQL_ROOT_USER'), 'pass' => loadClass('Helper')->getEnv('PGSQL_ROOT_PASSWORD')));
$connection['PgSQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- REDIS ----
if ($avail_redis) {
$host = $GLOBALS['REDIS_HOST_NAME'];
$succ = loadClass('Redis')->canConnect($error, $host);
$connection['Redis'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Redis')->getIpAddress();
$succ = loadClass('Redis')->canConnect($error, $host);
$connection['Redis'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
$succ = loadClass('Redis')->canConnect($error, $host);
$connection['Redis'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- MEMCACHED ----
if ($avail_memcd) {
$host = $GLOBALS['MEMCD_HOST_NAME'];
$succ = loadClass('Memcd')->canConnect($error, $host);
$connection['Memcached'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Memcd')->getIpAddress();
$succ = loadClass('Memcd')->canConnect($error, $host);
$connection['Memcached'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
$succ = loadClass('Memcd')->canConnect($error, $host);
$connection['Memcached'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- MONGO ----
if ($avail_mongo) {
$host = $GLOBALS['MONGO_HOST_NAME'];
$succ = loadClass('Mongo')->canConnect($error, $host);
$connection['MongoDB'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Mongo')->getIpAddress();
$succ = loadClass('Mongo')->canConnect($error, $host);
$connection['MongoDB'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
$succ = loadClass('Mongo')->canConnect($error, $host);
$connection['MongoDB'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- BIND (required)----
$host = $GLOBALS['DNS_HOST_NAME'];
$succ = loadClass('Dns')->canConnect($error, $host);
$connection['Bind'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Dns')->getIpAddress();
$succ = loadClass('Dns')->canConnect($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);
/*********************************************************************************
*
* H T M L
*
*********************************************************************************/
?>
getHead(true); ?>
getNavbar(); ?>
Base Stack
getCirle('dns'); ?>
getCirle('php'); ?>
getCirle('httpd'); ?>
SQL Stack
getCirle('mysql'); ?>
getCirle('pgsql'); ?>
NoSQL Stack
getCirle('redis'); ?>
getCirle('memcd'); ?>
getCirle('mongo'); ?>
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) ? '' : loadClass('Helper')->getEnv('PHP_XDEBUG_ENABLE'); ?>
getConfig('xdebug.remote_enable')): ?>
getConfig('xdebug.remote_enable') == 1 ? 'Yes' : 'No'; ?>
not installed.env file setting differs from custom php .ini file '; ?>
getConfig('xdebug.remote_enable'); ?>
|
Xdebug Remote |
getEnv('PHP_XDEBUG_REMOTE_HOST') == loadClass('Php')->getConfig('xdebug.remote_host')): ?>
getConfig('xdebug.remote_host'); ?>
not installed.env file setting differs from custom php .ini file '; ?>
getConfig('xdebug.remote_host'); ?>
|
Xdebug Port |
getEnv('PHP_XDEBUG_REMOTE_PORT') == loadClass('Php')->getConfig('xdebug.remote_port')): ?>
getConfig('xdebug.remote_port'); ?>
not installed.env file setting differs from custom php .ini file '; ?>
getConfig('xdebug.remote_port'); ?>
|
Tools |
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;}; ?> |
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;}; ?> |
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 |
|
getIpAddress(); ?> |
httpd |
|
getIpAddress(); ?> |
mysql |
|
getIpAddress(); ?> |
pgsql |
|
getIpAddress(); ?> |
redis |
|
getIpAddress(); ?> |
memcached |
|
getIpAddress(); ?> |
mongo |
|
getIpAddress(); ?> |
bind |
|
getIpAddress(); ?> |
Ports
Docker |
Host port |
Docker port |
php |
- |
9000 |
httpd |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_HTTPD');?> |
80 |
mysql |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MYSQL');?> |
3306 |
pgsql |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_PGSQL');?> |
5432 |
redis |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_REDIS');?> |
6379 |
memcached |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MEMCD');?> |
11211 |
mongo |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MONGO');?> |
27017 |
bind |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_BIND');?>/tcp
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_BIND');?>/udp
|
53/tcp 53/udp |
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('Helper')->getEnv('MYSQL_SERVER'); ?> |
/var/lib/mysql |
pgsql |
getEnv('HOST_PATH_PGSQL_DATADIR').'/'.loadClass('Helper')->getEnv('PGSQL_SERVER'); ?> |
/var/lib/postgresql/data/pgdata |
redis |
- |
- |
memcached |
- |
- |
mongo |
getEnv('HOST_PATH_MONGO_DATADIR'); ?> |
/data/db |
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 |
- |
- |
mongo |
- |
- |
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('MEMCD_SERVER'); ?> |
/var/log/memcached |
mongo |
- |
- |
bind |
- |
- |
getFooter(); ?>