authPage(); ?> 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(); ?>You can also enter the php container via ./shell.sh
and use the following cli tools:
Tools | |
---|---|
Angular Cli | |
AsgardCMS Installer | |
Codeception | |
Composer | |
Deployer | |
Git | |
Grunt Cli | |
Gulp | |
Laravel Installer | |
Laravel Lumen | |
Mupdf Tools | |
mysqldump-secure | |
Node | |
Npm | |
Phalcon Devtools | |
Phpunit | |
Stylelint | |
Symfony Cli | |
Vue Cli | |
Webpack Cli | |
Wordpress Cli | |
Yarn |
You have made the following base configuration to the Devilbox:
Settings | |
---|---|
uid | getUid(); ?> |
gid | getGid(); ?> |
vHost docroot dir | getEnv('HTTPD_DOCROOT_DIR'); ?> |
vHost config dir | getEnv('HTTPD_TEMPLATE_DIR'); ?> |
vHost TLD | *.getTldSuffix(); ?> |
DNS | EnabledOffline |
Postfix | getEnv('ENABLE_MAIL') ? 'Enabled' : 'No Disabled';?> |
The PHP container can connect to the following services via the specified hostnames and IP addresses.
Service | Hostname / IP |
---|---|
connect | '.$conn['host']; ?> '.$conn['host'].'|
Docker | Hostname | IP |
---|---|---|
php | getIpAddress(); ?> | |
httpd | getIpAddress(); ?> | |
mysql | getIpAddress(); ?> | |
pgsql | getIpAddress(); ?> | |
redis | getIpAddress(); ?> | |
memcached | getIpAddress(); ?> | |
mongo | getIpAddress(); ?> | |
bind | getIpAddress(); ?> |
Docker | Host port | Docker port |
---|---|---|
php | - | 9000 |
httpd |
getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_HTTPD');?> getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_HTTPD_SSL');?> |
80 443 |
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 |
Docker | Host path | Docker path |
---|---|---|
php | getEnv('HOST_PATH_HTTPD_DATADIR'); ?> | /shared/httpd |
httpd | getEnv('HOST_PATH_HTTPD_DATADIR'); ?> | /shared/httpd |
mysql | Docker volume | /var/lib/mysql |
pgsql | Docker volume | /var/lib/postgresql/data/pgdata |
redis | - | - |
memcached | - | - |
mongo | Docker volume | /data/db |
bind | - | - |
Docker | Host path | Docker path |
---|---|---|
php (ini) | ./cfg/php-ini-getEnv('PHP_SERVER'); ?> | /etc/php-custom.d |
php (fpm) | ./cfg/php-fpm-getEnv('PHP_SERVER'); ?> | /etc/php-fpm-custom.d |
httpd | ./cfg/getEnv('HTTPD_SERVER'); ?> | /etc/httpd-custom.d |
mysql | ./cfg/getEnv('MYSQL_SERVER'); ?> | /etc/mysql/conf.d |
pgsql | - | - |
redis | - | - |
memcached | - | - |
mongo | - | - |
bind | - | - |
Docker | Host path | Docker path |
---|---|---|
php | ./log/php-fpm-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 | - | - |