Merge pull request #62 from cytopia/release-0.10

Release v0.10
This commit is contained in:
cytopia 2017-05-26 13:53:15 +02:00 committed by GitHub
commit d09a588359
33 changed files with 721 additions and 241 deletions

View File

@ -10,8 +10,8 @@ error_reporting(-1);
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
$DEVILBOX_VERSION = 'v0.9'; $DEVILBOX_VERSION = 'v0.10';
$DEVILBOX_DATE = '2017-05-20'; $DEVILBOX_DATE = '2017-05-26';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json';
// //
@ -41,6 +41,7 @@ $MYSQL_HOST_NAME = 'mysql';
$PGSQL_HOST_NAME = 'pgsql'; $PGSQL_HOST_NAME = 'pgsql';
$REDIS_HOST_NAME = 'redis'; $REDIS_HOST_NAME = 'redis';
$MEMCD_HOST_NAME = 'memcd'; $MEMCD_HOST_NAME = 'memcd';
$MONGO_HOST_NAME = 'mongo';
// //
@ -132,6 +133,11 @@ function loadClass($class) {
$_LOADED_LIBS[$class] = \devilbox\Memcd::getInstance($GLOBALS['MEMCD_HOST_NAME']); $_LOADED_LIBS[$class] = \devilbox\Memcd::getInstance($GLOBALS['MEMCD_HOST_NAME']);
break; break;
case 'Mongo':
loadFile($class, $cnt_dir);
$_LOADED_LIBS[$class] = \devilbox\Mongo::getInstance($GLOBALS['MONGO_HOST_NAME']);
break;
// Get optional docker classes // Get optional docker classes
default: default:
// Redis // Redis

View File

@ -0,0 +1,50 @@
<?php require '../config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo loadClass('Html')->getHead(); ?>
</head>
<body>
<?php echo loadClass('Html')->getNavbar(); ?>
<div class="container">
<h1>MongoDB Databases</h1>
<br/>
<br/>
<div class="row">
<div class="col-md-12">
<?php if (!loadClass('Mongo')->isAvailable()): ?>
<p>MongoDB container is not running.</p>
<?php else: ?>
<table class="table table-striped ">
<thead class="thead-inverse ">
<tr>
<th>Name</th>
<th>Size</th>
<th>Empty</th>
</th>
</thead>
<tbody>
<?php foreach (loadClass('Mongo')->getDatabases() as $db): ?>
<tr>
<td><?php echo $db['name'];?></td>
<td><?php echo round($db['size']/(1024*1024), 2);?> MB</td>
<td><?php echo $db['empty'];?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
</div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?>
</body>
</html>

View File

@ -18,6 +18,7 @@ $avail_mysql = loadClass('Mysql')->isAvailable();
$avail_pgsql = loadClass('Pgsql')->isAvailable(); $avail_pgsql = loadClass('Pgsql')->isAvailable();
$avail_redis = loadClass('Redis')->isAvailable(); $avail_redis = loadClass('Redis')->isAvailable();
$avail_memcd = loadClass('Memcd')->isAvailable(); $avail_memcd = loadClass('Memcd')->isAvailable();
$avail_mongo = loadClass('Mongo')->isAvailable();
/************************************************************* /*************************************************************
@ -150,6 +151,32 @@ if ($avail_memcd) {
); );
} }
// ---- 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)---- // ---- BIND (required)----
$host = $GLOBALS['DNS_HOST_NAME']; $host = $GLOBALS['DNS_HOST_NAME'];
$succ = loadClass('Dns')->canConnect($error, $host); $succ = loadClass('Dns')->canConnect($error, $host);
@ -288,7 +315,7 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<?php echo loadClass('Html')->getCirle('memcd'); ?> <?php echo loadClass('Html')->getCirle('memcd'); ?>
</div> </div>
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;"> <div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
<?php echo loadClass('Html')->getCirle('mongodb'); ?> <?php echo loadClass('Html')->getCirle('mongo'); ?>
</div> </div>
</div> </div>
</div> </div>
@ -516,6 +543,13 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<td><?php echo loadClass('Memcd')->getIpAddress(); ?></td> <td><?php echo loadClass('Memcd')->getIpAddress(); ?></td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td><?php echo $GLOBALS['MONGO_HOST_NAME']; ?></td>
<td><?php echo loadClass('Mongo')->getIpAddress(); ?></td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?> <?php if ($avail_dns): ?>
<tr> <tr>
<th>bind</th> <th>bind</th>
@ -585,6 +619,13 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<td>11211</td> <td>11211</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td><?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MONGO');?></td>
<td>27017</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?> <?php if ($avail_dns): ?>
<tr> <tr>
<th>bind</th> <th>bind</th>
@ -656,6 +697,13 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<td>-</td> <td>-</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_MONGO_DATADIR'); ?></td>
<td>/data/db</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?> <?php if ($avail_dns): ?>
<tr> <tr>
<th>bind</th> <th>bind</th>
@ -724,6 +772,13 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<td>-</td> <td>-</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?> <?php if ($avail_dns): ?>
<tr> <tr>
<th>bind</th> <th>bind</th>
@ -792,6 +847,13 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
<td>/var/log/memcached</td> <td>/var/log/memcached</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?> <?php if ($avail_dns): ?>
<tr> <tr>
<th>bind</th> <th>bind</th>

View File

@ -0,0 +1,48 @@
<?php require '../config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo loadClass('Html')->getHead(); ?>
</head>
<body>
<?php echo loadClass('Html')->getNavbar(); ?>
<div class="container">
<h1>MongoDB Info</h1>
<br/>
<br/>
<div class="row">
<div class="col-md-12">
<?php if (!loadClass('Mongo')->isAvailable()): ?>
<p>MongoDB container is not running.</p>
<?php else: ?>
<table class="table table-striped">
<thead class="thead-inverse">
<tr>
<th>Variable</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<?php foreach (loadClass('Mongo')->getInfo() as $key => $val): ?>
<tr>
<td><?php print_r($key);?></td>
<td class="break-word"><pre><?php print_r($val);?></pre></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
</div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?>
</body>
</html>

View File

@ -34,6 +34,10 @@ class Html
'name' => 'PgSQL DB', 'name' => 'PgSQL DB',
'path' => '/db_pgsql.php' 'path' => '/db_pgsql.php'
), ),
array(
'name' => 'MongoDB DB',
'path' => '/db_mongo.php'
),
array( array(
'name' => 'Redis DB', 'name' => 'Redis DB',
'path' => '/db_redis.php' 'path' => '/db_redis.php'
@ -63,6 +67,10 @@ class Html
'name' => 'PgSQL Info', 'name' => 'PgSQL Info',
'path' => '/info_pgsql.php' 'path' => '/info_pgsql.php'
), ),
array(
'name' => 'MongoDB Info',
'path' => '/info_mongo.php'
),
array( array(
'name' => 'Redis Info', 'name' => 'Redis Info',
'path' => '/info_redis.php' 'path' => '/info_redis.php'
@ -271,6 +279,12 @@ HTML;
$available = loadClass('Memcd')->isAvailable(); $available = loadClass('Memcd')->isAvailable();
$name = loadClass('Memcd')->getName(); $name = loadClass('Memcd')->getName();
break; break;
case 'mongo':
$class = 'bg-danger';
$version = loadClass('Mongo')->getVersion();
$available = loadClass('Mongo')->isAvailable();
$name = loadClass('Mongo')->getName();
break;
default: default:
$available = false; $available = false;
$version = ''; $version = '';

View File

@ -0,0 +1,224 @@
<?php
namespace devilbox;
/**
* @requires devilbox::Logger
*/
class Mongo extends BaseClass implements BaseInterface
{
/*********************************************************************************
*
* Private Variables
*
*********************************************************************************/
/**
* MongoDB manager instance
* @var object|null
*/
private $_mongo = null;
/*********************************************************************************
*
* Constructor Overwrite
*
*********************************************************************************/
/**
* Use singleton getInstance() instead.
*
* @param string $user Username
* @param string $pass Password
* @param string $host Host
*/
public function __construct($hostname, $data = array())
{
parent::__construct($hostname, $data);
// Faster check if mongo is not loaded
if (!$this->isAvailable()) {
return;
}
$mongo = new \MongoDB\Driver\Manager('mongodb://'.$hostname);
// MongoDB uses lazy loading of server list
// so just execute an arbitrary command in order
// to make it populate the server list
$command = new \MongoDB\Driver\Command(array('ping' => 1));
try {
$mongo->executeCommand('admin', $command);
} catch (\MongoDB\Driver\Exception\ConnectionTimeoutException $e) {
$this->_connect_error = $e;
$this->_connect_errno = 1;
return;
}
// retrieve server list
$servers = $mongo->getServers();
if (!isset($servers[0])) {
$this->_connect_error = 'Failed to connect to MongoDB host on '.$hostname.' (No host info available)';
$this->_connect_errno = 2;
return;
} else if ($servers[0]->getHost() != $hostname) {
$this->_connect_error = 'Failed to connect to MongoDB host on '.$hostname.' (servername does not match: '.$servers[0]->getHost().')';
$this->_connect_errno = 3;
return;
}
$this->_mongo = $mongo;
}
/*********************************************************************************
*
* Select functions
*
*********************************************************************************/
/**
* Execute MongoDB command and return iteratable
* @param array $command Command
* @return iteratable
*/
private function command($command)
{
$cmd = new \MongoDB\Driver\Command($command);
if ($this->_mongo) {
try {
$cursor = $this->_mongo->executeCommand('admin', $cmd);
return $cursor->toArray();
} catch(\MongoDB\Driver\Exception $e) {
loadClass('Logger')->error($e->getMessage().'. Could not execute MongoDB command: '.print_r($command, true));
}
}
return array();
}
/**
* Get all MongoDB Databases.
* @return mixed[] Array of databases
*/
public function getDatabases()
{
$databases = array();
$tmp = $this->command(array('listDatabases' => true));
if (isset($tmp[0])) {
foreach ($tmp[0]->databases as $db) {
$databases[] = array(
'name' => $db->name,
'size' => $db->sizeOnDisk,
'empty' => $db->empty
);
}
}
return $databases;
}
public function getInfo()
{
$info = array();
$tmp = $this->command(array('serverStatus' => true));
if (isset($tmp[0])) {
$info = $tmp[0];
}
return $info;
}
/*********************************************************************************
*
* Interface required functions
*
*********************************************************************************/
private $_can_connect = array();
private $_can_connect_err = array();
private $_name = null;
private $_version = null;
public function canConnect(&$err, $hostname, $data = array())
{
$err = false;
// Return if already cached
if (isset($this->_can_connect[$hostname])) {
// Assume error for unset error message
$err = isset($this->_can_connect_err[$hostname]) ? $this->_can_connect_err[$hostname] : true;
return $this->_can_connect[$hostname];
}
$manager = new \MongoDB\Driver\Manager('mongodb://'.$hostname);
// MongoDB uses lazy loading of server list
// so just execute an arbitrary command in order
// to make it populate the server list
$command = new \MongoDB\Driver\Command(array('ping' => 1));
$manager->executeCommand('admin', $command);
// retrieve server list
$servers = $manager->getServers();
if (!isset($servers[0])) {
$err = 'Failed to connect to MongoDB host on '.$hostname.' (No host info available)';
$this->_can_connect[$hostname] = false;
} else if ($servers[0]->getHost() != $hostname) {
$err = 'Failed to connect to MongoDB host on '.$hostname.' (servername does not match: '.$servers[0]->getHost().')';
$this->_can_connect[$hostname] = false;
}
else {
$this->_can_connect[$hostname] = true;
}
$this->_can_connect_err[$hostname] = $err;
return $this->_can_connect[$hostname];
}
public function getName($default = 'MongoDB')
{
return $default;
}
public function getVersion()
{
// Return if already cached
if ($this->_version !== null) {
return $this->_version;
}
// Return empty if not available
if (!$this->isAvailable()) {
$this->_version = '';
return $this->_version;
}
if ($this->_mongo) {
$info = $this->getInfo();
if (!isset($info->version)) {
loadClass('Logger')->error('Could not get MongoDB version');
$this->_version = '';
} else {
$this->_version = $info->version;
}
}
return $this->_version;
}
}

View File

@ -143,15 +143,6 @@ get_data_mounts() {
} }
###
### Default enabled Docker Versions
###
get_enabled_versions() {
grep -E '^[A-Z]+_SERVER=' "${DEVILBOX_PATH}/.env" | sed 's/_SERVER=/\t/g'
}
################################################################################ ################################################################################
# #
@ -234,17 +225,17 @@ enable_docker_php() {
# #
################################################################################ ################################################################################
devilbox_start() { devilbox_configure() {
_srv1="${1}" _srv1="${1}"
_ver1="${2}" _ver1="${2}"
_srv2="${3}" _srv2="${3}"
_ver2="${4}" _ver2="${4}"
# Default values for remaining servers # Default values for remaining servers
_def_php="php-fpm-7.0" _def_php="${5}"
_def_httpd="nginx-stable" _def_httpd="${6}"
_def_mysql="mariadb-10.0" _def_mysql="${7}"
_def_pgsql="9.6" _def_pgsql="${8}"
# Specific enabled servers # Specific enabled servers
_set_php="" _set_php=""
@ -294,10 +285,6 @@ devilbox_start() {
_set_pgsql="${_def_pgsql}" _set_pgsql="${_def_pgsql}"
fi fi
# Print Headline
print_h1 "${_srv1}-${_ver1} vs ${_srv2}-${_ver2}"
# Adjust .env # Adjust .env
comment_all_dockers comment_all_dockers
@ -306,16 +293,46 @@ devilbox_start() {
enable_docker_httpd "${_set_httpd}" enable_docker_httpd "${_set_httpd}"
enable_docker_mysql "${_set_mysql}" enable_docker_mysql "${_set_mysql}"
enable_docker_pgsql "${_set_pgsql}" enable_docker_pgsql "${_set_pgsql}"
}
# Run
docker-compose up -d devilbox_configured_settings() {
grep -E '^[A-Z]+_SERVER=' "${DEVILBOX_PATH}/.env" | sed 's/_SERVER=/\t/g'
}
devilbox_pull() {
# Make sure to pull until success
ret=1
while [ "${ret}" != "0" ]; do
if ! docker-compose pull; then
ret=1
else
ret=0
fi
done
}
devilbox_start() {
# Make sure to start until success
ret=1
while [ "${ret}" != "0" ]; do
if ! docker-compose up -d; then
ret=1
# Stop it and try again
devilbox_stop
else
ret=0
fi
done
# Wait for http to return 200 # Wait for http to return 200
printf "wait " printf "wait "
_max="90" _max="90"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
for i in $(seq 1 "${_max}"); do for i in $(seq 1 "${_max}"); do
if [ "$( curl --connect-timeout 1 --max-time 1 -s -o /dev/null -w '%{http_code}' http://localhost/index.php )" = "200" ]; then if [ "$( curl --connect-timeout 1 --max-time 1 -s -o /dev/null -w '%{http_code}' http://127.0.0.1/index.php )" = "200" ]; then
break; break;
fi fi
sleep 1 sleep 1
@ -329,6 +346,25 @@ devilbox_start() {
} }
devilbox_print_actual_settings() {
VERSIONS="$( curl -q http://127.0.0.1/index.php 2>/dev/null | \
grep -E 'circles' | \
grep -oE '<strong.*strong>.*\(.*\)' | \
sed 's/<strong>//g' | \
sed 's/<\/strong>.*(/\t/g' | \
sed 's/)//g' )"
IFS='
'
for v in ${VERSIONS}; do
service="$( echo "${v}" | awk '{print $1}' )"
version="$( echo "${v}" | awk '{print $2}' )"
printf "%-15s%s\n" "${service}" "${version}"
done
}
devilbox_stop() { devilbox_stop() {
# Stop existing dockers # Stop existing dockers
cd "${DEVILBOX_PATH}" || exit 1 cd "${DEVILBOX_PATH}" || exit 1
@ -346,178 +382,67 @@ devilbox_stop() {
done done
} }
devilbox_show() {
###
### 1. Show Info
###
print_h2 "Info"
# Show wanted versions devilbox_print_errors() {
echo "[Wanted] .env settings" _url="${1}"
echo "------------------------------------------------------------"
get_enabled_versions print_h2 "[ERROR] Curl"
curl -vv "${_url}" || true
echo echo
# Get actual versions print_h2 "[ERROR] docker-compose ps"
echo "[Actual] http://localhost settings" docker-compose ps
echo "------------------------------------------------------------"
curl -q http://localhost/index.php 2>/dev/null | \
grep -E 'circles' | \
grep -oE '<strong.*strong>.*\(.*\)' | \
sed 's/<strong>//g' | \
sed 's/<\/strong>.*(/\t/g' | \
sed 's/)//g'
echo echo
print_h2 "[ERROR] docker-compose logs"
docker-compose logs
echo
print_h2 "[ERROR] log files"
ls -lap log/
sudo find log -type f -exec sh -c 'echo "{}:\n-----------------"; cat "{}"; echo "\n\n"' \;
} }
################################################################################ ################################################################################
# #
# T E S T T H E D E V I L B O X # T E S T T H E D E V I L B O X
# #
################################################################################ ################################################################################
devilbox_test() { devilbox_test_compose() {
###
### Variables
###
_ret=0 # Final exit code
_oks=17 # Require this many [OK]'s on the page
###
### 2. Test docker-compose
###
print_h2 "docker-compose"
echo "docker-compose ps"
echo "------------------------------------------------------------"
if _test_docker_compose >/dev/null 2>&1; then
echo "[OK]: All running"
else
echo "[ERR]: Broken"
_ret="$(( _ret + 1 ))"
fi
###
### 3. Show Curl output
###
print_h2 "3. Test status via curl"
echo "Count [OK]'s on curl-ed url"
echo "------------------------------------------------------------"
if ! _cnt="$( _test_curled_oks "${_oks}" )"; then
_ret="$(( _ret + 1 ))"
echo "[ERR]: ${_cnt} / ${_oks} (Not all 'dvlbox-ok' found)"
else
echo "[OK]: ${_cnt} / ${_oks} (All 'dvlbox-ok' found)"
fi
echo
echo "Count [ERR]'s on curl-ed url"
echo "------------------------------------------------------------"
if ! _cnt="$( _test_curled_err )"; then
_ret="$(( _ret + 1 ))"
echo "[ERR]: ${_cnt} / 0 (Found some 'dvlbox-err')"
else
echo "[OK]: ${_cnt} / 0 (No 'dvlbox-err' found)"
fi
echo
###
### Final return
###
if [ "${_ret}" != "0" ]; then
print_h2 "4. Error output"
echo "Curl"
echo "------------------------------------------------------------"
curl -vv http://localhost/index.php || true
echo
echo "docker-compose ps"
echo "------------------------------------------------------------"
docker-compose ps
echo
echo "docker-compose logs"
echo "------------------------------------------------------------"
docker-compose logs
echo
echo "log files"
echo "------------------------------------------------------------"
ls -lap log/
sudo find log -type f -exec sh -c 'echo "{}:\n-----------------"; cat "{}"; echo "\n\n"' \;
return 1
fi
return 0
}
################################################################################
#
# T E S T I N G H E L P E R S
#
################################################################################
###
### Test against stopped containers
###
_test_docker_compose() {
_broken="$( docker-compose ps | grep -c 'Exit' || true )" _broken="$( docker-compose ps | grep -c 'Exit' || true )"
_running="$( docker-compose ps | grep -c 'Up' || true )" _running="$( docker-compose ps | grep -c 'Up' || true )"
_total="$( docker-compose ps -q | grep -c '' || true )" _total="$( docker-compose ps -q | grep -c '' || true )"
if [ "${_broken}" != "0" ]; then if [ "${_broken}" != "0" ]; then
echo "[ERR]: Broken: ${_broken} broken container"
return 1 return 1
fi fi
if [ "${_running}" != "${_total}" ]; then if [ "${_running}" != "${_total}" ]; then
echo "[ERR]: Broken: ${_running} / ${_total} container running"
return 1 return 1
fi fi
echo "[OK]: All running"
return 0 return 0
} }
### devilbox_test_url() {
### Test [OK]'s found on website # Variables
### _url="${1}"
_test_curled_oks() { _pattern="${2}"
_oks="${1}" _number="${3}"
_find_ok="dvlbox-ok"
_count="$( curl -q http://localhost/index.php 2>/dev/null | grep -c "${_find_ok}" || true )" _count="$( curl -q "${_url}" 2>/dev/null | grep -c "${_pattern}" || true )"
echo "${_count}"
if [ "${_count}" != "${_oks}" ]; then if [ "${_count}" != "${_number}" ]; then
echo "[ERR]: Found ${_count}/${_number} of '${_pattern}'"
return 1 return 1
else
return 0
fi
}
###
### Test [ERR]'s found on website
###
_test_curled_err() {
_find_err="dvlbox-err"
_count="$( curl -q http://localhost/index.php 2>/dev/null | grep -c "${_find_err}" || true )"
echo "${_count}"
if [ "${_count}" != "0" ]; then
return 1
else
return 0
fi fi
echo "[OK]: Found ${_count}/${_number} of '${_pattern}'"
return 0
} }

View File

@ -58,6 +58,14 @@ set_host_port_httpd "80"
set_host_port_mysql "3306" set_host_port_mysql "3306"
set_host_port_pgsql "5432" set_host_port_pgsql "5432"
###
### Default values for container
###
DEF_PHP="php-fpm-7.0"
DEF_HTTPD="nginx-stable"
DEF_MYSQL="mariadb-10.0"
DEF_PGSQL="9.6"
################################################################################ ################################################################################
@ -66,7 +74,74 @@ set_host_port_pgsql "5432"
# #
################################################################################ ################################################################################
devilbox_start "${DVL_SRV1}" "${DVL_VER1}" "${DVL_SRV2}" "${DVL_VER2}" ###
devilbox_show ### Docker Host settings
devilbox_test ###
print_h1 "Docker Host settings"
print_h2 "Listening services"
run "netstat -tulpn"
print_h2 "Docker version"
run "docker --version"
run "docker-compose --version"
###
### Configure
###
print_h1 "Configuration: ${DVL_SRV1}-${DVL_VER1} vs ${DVL_SRV2}-${DVL_VER2}"
print_h2 "Enabled settings in .env"
devilbox_configure "${DVL_SRV1}" "${DVL_VER1}" "${DVL_SRV2}" "${DVL_VER2}" "${DEF_PHP}" "${DEF_HTTPD}" "${DEF_MYSQL}" "${DEF_PGSQL}"
devilbox_configured_settings
###
### Download and run
###
print_h1 "Startup Devilbox"
print_h2 "Download"
devilbox_pull
print_h2 "Run"
devilbox_start
print_h2 "Actual settings from index.php"
devilbox_print_actual_settings
###
### Test
###
print_h1 "Testing"
print_h2 "docker-compose"
if ! devilbox_test_compose; then
devilbox_print_errors "http://127.0.0.1/index.php"
exit 1
fi
print_h2 "Testing 'dvlbox-ok': index.php"
if ! devilbox_test_url "http://127.0.0.1/index.php" "dvlbox-ok" "20"; then
devilbox_print_errors "http://127.0.0.1/index.php"
exit 1
fi
print_h2 "Testing 'dvlbox-err': index.php"
if ! devilbox_test_url "http://127.0.0.1/index.php" "dvlbox-err" "0"; then
devilbox_print_errors "http://127.0.0.1/index.php"
exit 1
fi
###
### Stop
###
print_h1 "Shutdown and exit"
devilbox_stop devilbox_stop

View File

@ -172,13 +172,12 @@ matrix:
### ###
before_install: before_install:
# Get newer docker version # Get newer docker version
- sudo apt-get update - max=20; i=0; while [ $i -lt $max ]; do if sudo apt-get update; then break; else i=$((i+1)); fi done
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine - max=20; i=0; while [ $i -lt $max ]; do if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine; then break; else i=$((i+1)); fi done
# Get newer docker-compose version # Get newer docker-compose version
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > docker-compose - curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose - chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin - sudo mv -f docker-compose /usr/local/bin
### ###
@ -190,9 +189,14 @@ before_script:
- sudo /etc/init.d/mysql stop || true - sudo /etc/init.d/mysql stop || true
- sudo /etc/init.d/postgresql stop || true - sudo /etc/init.d/postgresql stop || true
- sudo /etc/init.d/memcached stop || true - sudo /etc/init.d/memcached stop || true
- sudo /etc/init.d/redis stop || true
- sudo /etc/init.d/mongodb stop || true
- sudo service mysql stop || true - sudo service mysql stop || true
- sudo service postgresql stop || true - sudo service postgresql stop || true
- sudo service memcached stop || true - sudo service memcached stop || true
- sudo service redis stop || true
- sudo service mongodb stop || true
- netstat -tulpn - netstat -tulpn

View File

@ -7,10 +7,10 @@
[Run-time Matrix](#run-time-matrix) | [Run-time Matrix](#run-time-matrix) |
[Intranet](#intranet-overview) | [Intranet](#intranet-overview) |
[Screenshots](#screenshots) | [Screenshots](#screenshots) |
[License](#license) |
[Contributing](#contributing) | [Contributing](#contributing) |
[License](#license)
![Devilbox](doc/img/devilbox-dash.png) ![Devilbox](docs/img/devilbox-dash.png)
[![Build Status](https://travis-ci.org/cytopia/devilbox.svg?branch=master)](https://travis-ci.org/cytopia/devilbox) ![Tag](https://img.shields.io/github/tag/cytopia/devilbox.svg) [![type](https://img.shields.io/badge/type-Docker-orange.svg)](https://www.docker.com/) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Build Status](https://travis-ci.org/cytopia/devilbox.svg?branch=master)](https://travis-ci.org/cytopia/devilbox) ![Tag](https://img.shields.io/github/tag/cytopia/devilbox.svg) [![type](https://img.shields.io/badge/type-Docker-orange.svg)](https://www.docker.com/) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
@ -52,18 +52,18 @@ The above will start all containers, you can however also just start the contain
```shell ```shell
$ docker-compose up httpd php mysql redis $ docker-compose up httpd php mysql redis
``` ```
![Devilbox](doc/img/devilbox-dash-01.png) ![Devilbox](docs/img/devilbox-dash-01.png)
```shell ```shell
$ docker-compose up httpd php mysql pgsql redis memcd $ docker-compose up httpd php mysql pgsql redis memcd
``` ```
![Devilbox](doc/img/devilbox-dash-02.png) ![Devilbox](docs/img/devilbox-dash-02.png)
```shell ```shell
$ docker-compose up httpd php pgsql memcd $ docker-compose up httpd php pgsql memcd
``` ```
![Devilbox](doc/img/devilbox-dash-03.png) ![Devilbox](docs/img/devilbox-dash-03.png)
### Run different versions ### Run different versions
@ -137,25 +137,25 @@ The devilbox has everything setup for you. The only thing you will have to insta
### Video Tutorials ### Video Tutorials
[![Devilbox setup and workflow](doc/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo) [![Devilbox setup and workflow](docs/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo)
[![Devilbox email catch-all](doc/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY) [![Devilbox email catch-all](docs/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY)
### Documentation ### Documentation
For setup, usage and examples see detailed **[Documentation](doc/README.md)**. For setup, usage and examples see detailed **[Documentation](docs/README.md)**.
| Documentaion | Description | | Documentaion | Description |
|---------------------------------------|-------------| |---------------------------------------|-------------|
| [Overview](doc/README.md) | General overview | | [Overview](docs/README.md) | General overview |
| [Configuration](doc/Configuration.md) | How to configure the devilbox | | [Configuration](docs/Configuration.md) | How to configure the devilbox |
| [Usage](doc/Usage.md) | How to use the devilbox | | [Usage](docs/Usage.md) | How to use the devilbox |
| [Updating](doc/Updating.md) | How to update | | [Updating](docs/Updating.md) | How to update |
| [Info](doc/Info.md) | Technical information | | [Info](docs/Info.md) | Technical information |
| [PHP Projects](doc/PHP_Projects.md) | How to manage projects | | [PHP Projects](docs/PHP_Projects.md) | How to manage projects |
| [Emails](doc/Emails.md) | How email catching works | | [Emails](docs/Emails.md) | How email catching works |
| [Logs](doc/Logs.md) | How to view log files | | [Logs](docs/Logs.md) | How to view log files |
| [Intranet](doc/Intranet.md) | The built-in intranet | | [Intranet](docs/Intranet.md) | The built-in intranet |
| [FAQ](doc/FAQ.md) | Frequently asked questions | | [FAQ](docs/FAQ.md) | Frequently asked questions |
## Run-time Matrix ## Run-time Matrix
@ -196,10 +196,11 @@ No need to install and configure different versions locally. Simply choose your
| Cassandra | CouchDB | Memcached | MongoDB | Redis | | Cassandra | CouchDB | Memcached | MongoDB | Redis |
|-----------|---------|-----------|---------|-------| |-----------|---------|-----------|---------|-------|
| Cassandra 2.1 | CouchDB 1.6 | [![Travis CI](https://img.shields.io/travis/docker-library/memcached/master.svg)](https://travis-ci.org/docker-library/memcached/branches) Memcached latest | MongoDB 2.6 | [![Travis CI](https://img.shields.io/travis/docker-library/redis/master.svg)](https://travis-ci.org/docker-library/redis/branches) [Redis 2.8](https://github.com/docker-library/redis) | | 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 | | MongoDB 3.0 | [![Travis CI](https://img.shields.io/travis/docker-library/redis/master.svg)](https://travis-ci.org/docker-library/redis/branches) [Redis 3.0](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 | | | MongoDB 3.2 | [![Travis CI](https://img.shields.io/travis/docker-library/redis/master.svg)](https://travis-ci.org/docker-library/redis/branches) [Redis 3.2](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) |
| | | | MongoDB 3.4 | | | | | | [![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.5](https://github.com/docker-library/mongo) | |
<sub>**Note:** Entries without links or without build-status are planned, but not yet available. See [ROADMAP](https://github.com/cytopia/devilbox/issues/23) for tasks and upcoming features.</sub> <sub>**Note:** Entries without links or without build-status are planned, but not yet available. See [ROADMAP](https://github.com/cytopia/devilbox/issues/23) for tasks and upcoming features.</sub>
@ -253,7 +254,7 @@ The homepage shows you the status of your current configured setup.
* what other settings have been set * what other settings have been set
* did any errors occur? * did any errors occur?
![Intranet Home](doc/img/01_intranet_home.png "Intranet Home") ![Intranet Home](docs/img/01_intranet_home.png "Intranet Home")
### Virtual Host overview ### Virtual Host overview
@ -265,30 +266,35 @@ Virtual Hosts are considered valid if the following requirements are met (on the
* `htdocs` folder/symlink exists in your project folder * `htdocs` folder/symlink exists in your project folder
* `/etc/hosts` has a valid DNS config for your host: `127.0.0.1 <project-folder>.<TLD_SUFFIX>` (alternatively the bundle BIND server can be attached to your host-computer). * `/etc/hosts` has a valid DNS config for your host: `127.0.0.1 <project-folder>.<TLD_SUFFIX>` (alternatively the bundle BIND server can be attached to your host-computer).
![Intranet vHost](doc/img/02_intranet_vhosts.png "Intranet Home") ![Intranet vHost](docs/img/02_intranet_vhosts.png "Intranet Home")
### Database overview ### Database overview
Shows you all the databases that are loaded Shows you all the databases that are loaded
![Intranet DB](doc/img/03_intranet_databases.png "Intranet Home") ![Intranet DB](docs/img/03_intranet_databases.png "Intranet Home")
### Email overview ### Email overview
Shows you all the emails that have been sent. No email will actually be sent outside, but they are all catched by one account and presented here. Shows you all the emails that have been sent. No email will actually be sent outside, but they are all catched by one account and presented here.
![Intranet Email](doc/img/04_intranet_emails.png "Intranet Home") ![Intranet Email](docs/img/04_intranet_emails.png "Intranet Home")
## Contributing
Contributers are welcome in any way.
First of all, if you like the project, please **do star it**. Starring is an important measurement to see the number of active users and better allows me to organize my time and effort I can put into this project.
Secondly, please **do report all bugs**. This will not only help you get your problem fixed, but also help others as they might encounter the same.
And last but not least, you can also get actively involved. **Do clone the project** and start improving whatever you think is useful. There is quite a lot todo and planned. If you like to contribute, view [CONTRIBUTING.md](CONTRIBUTING.md) and [ROADMAP](https://github.com/cytopia/devilbox/issues/23).
Major contributors will be credited within the intranet and on the github page.
## License ## License
[MIT License](LICENSE.md) [MIT License](LICENSE.md)
## Contributing
There is quite a lot todo and planned. If you like to contribute, view [CONTRIBUTING.md](CONTRIBUTING.md) and [ROADMAP](https://github.com/cytopia/devilbox/issues/23).
Contributors will be credited within the intranet and on the github page.

View File

@ -31,12 +31,14 @@ services:
# Bind (DNS Server) # Bind (DNS Server)
# ---------------------------------------- # ----------------------------------------
bind: bind:
image: cytopia/bind:latest #image: cytopia/bind:latest
image: cytopia/bind:0.10
restart: always restart: always
ports: ports:
# [local-machine:]local-port:docker-port # [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND}:53" - "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND}:53"
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND}/udp:53/udp" - "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND}/udp:53/udp"
environment: environment:
## ##
## Debug? ## Debug?
@ -48,6 +50,7 @@ services:
## ##
- WILDCARD_DOMAIN=${TLD_SUFFIX:-loc} - WILDCARD_DOMAIN=${TLD_SUFFIX:-loc}
- WILDCARD_ADDRESS=172.16.238.11 - WILDCARD_ADDRESS=172.16.238.11
- BIND_DNS_RESOLVER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
dns: dns:
- 127.0.0.1 - 127.0.0.1
@ -62,7 +65,7 @@ services:
# ---------------------------------------- # ----------------------------------------
php: php:
#image: cytopia/${PHP_SERVER:-php-fpm-7.0}:latest #image: cytopia/${PHP_SERVER:-php-fpm-7.0}:latest
image: cytopia/${PHP_SERVER:-php-fpm-7.0}:0.9 image: cytopia/${PHP_SERVER:-php-fpm-7.0}:0.10
restart: always restart: always
# Manually build via `docker-compose build` # Manually build via `docker-compose build`
@ -109,7 +112,7 @@ services:
## ##
## Enable 127.0.0.1 Port-forwarding ## Enable 127.0.0.1 Port-forwarding
## ##
- FORWARD_PORTS_TO_LOCALHOST=3306:mysql:3306,5432:pgsql:5432,6379:redis:6379,11211:memcd:11211 - FORWARD_PORTS_TO_LOCALHOST=3306:mysql:3306,5432:pgsql:5432,6379:redis:6379,11211:memcd:11211,27017:mongo:27017
## ##
## Additional variables to announce to intranet/php-container ## Additional variables to announce to intranet/php-container
@ -122,10 +125,12 @@ services:
- HOST_PORT_PGSQL - HOST_PORT_PGSQL
- HOST_PORT_REDIS - HOST_PORT_REDIS
- HOST_PORT_MEMCD - HOST_PORT_MEMCD
- HOST_PORT_MONGO
# Data dir paths # Data dir paths
- HOST_PATH_HTTPD_DATADIR - HOST_PATH_HTTPD_DATADIR
- HOST_PATH_MYSQL_DATADIR - HOST_PATH_MYSQL_DATADIR
- HOST_PATH_PGSQL_DATADIR - HOST_PATH_PGSQL_DATADIR
- HOST_PATH_MONGO_DATADIR
# Database credentials # Database credentials
- PGSQL_ROOT_USER - PGSQL_ROOT_USER
- PGSQL_ROOT_PASSWORD - PGSQL_ROOT_PASSWORD
@ -137,6 +142,7 @@ services:
- MYSQL_SERVER - MYSQL_SERVER
- REDIS_SERVER - REDIS_SERVER
- MEMCD_SERVER - MEMCD_SERVER
- MONGO_SERVER
networks: networks:
app_net: app_net:
@ -415,6 +421,33 @@ services:
- httpd - httpd
# ----------------------------------------
# Mongo
# ----------------------------------------
mongo:
image: mongo:${MONGO_SERVER:-latest}
ports:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MONGO}:27017"
networks:
app_net:
ipv4_address: 172.16.238.16
volumes:
# ---- Format: ----
# HOST-DIRECTORY : DOCKER-DIRECTORY
# Mount MySQL Data directory
- ${HOST_PATH_MONGO_DATADIR}:/data/db
depends_on:
- bind
- php
- httpd
################################################################################ ################################################################################
# NETWORK # NETWORK
################################################################################ ################################################################################

View File

@ -32,6 +32,7 @@ It is best to use the hostnames and not to rely on the ip addresses as they migh
| PostgreSQL | pgsql | pgsql | 172.16.238.13 | | PostgreSQL | pgsql | pgsql | 172.16.238.13 |
| Redis | redis | redis | 172.16.238.14 | | Redis | redis | redis | 172.16.238.14 |
| Memcached | memcd | memcd | 172.16.238.15 | | Memcached | memcd | memcd | 172.16.238.15 |
| MongoDB | mongo | mongo | 172.16.238.16 |
### Background ### Background
@ -44,9 +45,10 @@ This is also the reason it does some more magic than actually required.
The PHP container is using [socat](https://linux.die.net/man/1/socat) to The PHP container is using [socat](https://linux.die.net/man/1/socat) to
1. forward the remote mysql port `3306` (on the mysql container) to its own `127.0.0.1:3306` 1. forward the remote mysql port `3306` (on the mysql container) to its own `127.0.0.1:3306`
2. forward the remote pgsql port `5432` (on the mysql container) to its own `127.0.0.1:5432` 2. forward the remote pgsql port `5432` (on the pgsql container) to its own `127.0.0.1:5432`
3. forward the remote redis port `6379` (on the mysql container) to its own `127.0.0.1:6379` 3. forward the remote redis port `6379` (on the redis container) to its own `127.0.0.1:6379`
3. forward the remote memcached port `11211` (on the memcd container) to its own `127.0.0.1:11211` 4. forward the remote memcached port `11211` (on the memcd container) to its own `127.0.0.1:11211`
5. forward the remote mongodb port `27017` (on the mongo container) to its own `127.0.0.1:27017`
#### Background - Docker Host #### Background - Docker Host
@ -56,6 +58,7 @@ The docker host (your computer) does exactly the same as the `php` container.
2. container pgsql port `5432` is exposed to the host on port `127.0.0.1:5432` 2. container pgsql port `5432` is exposed to the host on port `127.0.0.1:5432`
3. container redis port `6379` is exposed to the host on port `127.0.0.1:6379` 3. container redis port `6379` is exposed to the host on port `127.0.0.1:6379`
3. container memcd port `11211` is exposed to the host on port `127.0.0.1:11211` 3. container memcd port `11211` is exposed to the host on port `127.0.0.1:11211`
3. container mongo port `27017` is exposed to the host on port `127.0.0.1:27017`
Also the database sockets from the container are mounted into the host. Also the database sockets from the container are mounted into the host.

View File

Before

Width:  |  Height:  |  Size: 355 KiB

After

Width:  |  Height:  |  Size: 355 KiB

View File

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -16,7 +16,7 @@
### ###
### 1: Yes ### 1: Yes
### 0: No ### 0: No
DEBUG_COMPOSE_ENTRYPOINT=1 DEBUG_COMPOSE_ENTRYPOINT=0
### ###
@ -79,6 +79,24 @@ TLD_SUFFIX=loc
DNS_CHECK_TIMEOUT=1 DNS_CHECK_TIMEOUT=1
###
### Set your user id and group id
###
### This should be changed to the value of your local
### users uid and gid
###
### Type `id` on the terminal to find out your values
###
NEW_UID=1000
NEW_GID=1000
###
### Timezone for all dockers and service config files
###
TIMEZONE=Europe/Berlin
################################################################################ ################################################################################
### ###
@ -139,8 +157,6 @@ PGSQL_SERVER=9.6
### ###
### 1.5 Choose Redis Server Image ### 1.5 Choose Redis Server Image
### (only for docker-compose.optional.yml)
### $ docker-compose -f docker-compose.optional.yml up
### ###
#REDIS_SERVER=2.8 #REDIS_SERVER=2.8
#REDIS_SERVER=3.0 #REDIS_SERVER=3.0
@ -148,9 +164,7 @@ REDIS_SERVER=3.2
### ###
### 1.6 Choose Memcahced Server Image ### 1.6 Choose Memcached Server Image
### (only for docker-compose.optional.yml)
### $ docker-compose -f docker-compose.optional.yml up
### ###
MEMCD_SERVER=1.4.21 MEMCD_SERVER=1.4.21
#MEMCD_SERVER=1.4.22 #MEMCD_SERVER=1.4.22
@ -171,6 +185,14 @@ MEMCD_SERVER=1.4.21
#MEMCD_SERVER=latest #MEMCD_SERVER=latest
###
### 1.7 Choose Mongo Server Image
###
#MONGO_SERVER=2.8
#MONGO_SERVER=3.0
#MONGO_SERVER=3.2
MONGO_SERVER=3.4
#MONGO_SERVER=3.5
@ -220,29 +242,17 @@ HOST_PATH_MYSQL_DATADIR=./data/mysql
HOST_PATH_PGSQL_DATADIR=./data/pgsql HOST_PATH_PGSQL_DATADIR=./data/pgsql
################################################################################
### ###
### 3. GENERAL DOCKER CONTAINER SETTINGS ### Local filesystem path to mongodb datadir.
### ###
################################################################################ ### This can be an existing mongodb data directory or empty.
### If it already is a mongodb data directory with content,
### it will be mounted into the docker and used.
### ###
### Set your user id and group id ### If this directory is empty, a new mongodb database will be
### created.
### ###
### This should be changed to the value of your local HOST_PATH_MONGO_DATADIR=./data/mongo
### users uid and gid
###
### Type `id` on the terminal to find out your values
###
NEW_UID=1000
NEW_GID=1000
###
### Timezone for all dockers and service config files
###
TIMEZONE=Europe/Berlin
@ -342,7 +352,7 @@ HOST_PORT_PGSQL=5432
################################################################################ ################################################################################
### ###
### Expost Redis Port to Host ### Expose Redis Port to Host
### ###
HOST_PORT_REDIS=6379 HOST_PORT_REDIS=6379
@ -355,18 +365,38 @@ HOST_PORT_REDIS=6379
################################################################################ ################################################################################
### ###
### Expost Memcached Port to Host ### Expose Memcached Port to Host
### ###
HOST_PORT_MEMCD=11211 HOST_PORT_MEMCD=11211
################################################################################ ################################################################################
### ###
### 9. Bind Docker Settings ### 9. MongoDB Docker Settings
### ###
################################################################################ ################################################################################
### ###
### Expost Bind Port to Host ### Expose MongoDB Port to Host
###
HOST_PORT_MONGO=27017
################################################################################
###
### 10. Bind Docker Settings
###
################################################################################
###
### Expose Bind Port to Host
### ###
HOST_PORT_BIND=53 HOST_PORT_BIND=53
###
### Add comma separated DNS server from which you want to receive DNS
### You can also add DNS servers from your LAN (if any are available)
###
BIND_DNS_RESOLVER=8.8.8.8,8.8.4.4