Merge pull request #942 from cytopia/release/v3.0.0-beta-0.1

🎅🎄🎁
This commit is contained in:
cytopia 2022-12-25 20:42:06 +01:00 committed by GitHub
commit 6819619d8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
77 changed files with 670 additions and 142 deletions

View File

@ -13,8 +13,8 @@ error_reporting(-1);
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
$DEVILBOX_VERSION = 'v2.4.0';
$DEVILBOX_DATE = '2022-12-18';
$DEVILBOX_VERSION = 'v3.0.0-beta-0.1';
$DEVILBOX_DATE = '2022-12-24';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
//

View File

@ -0,0 +1,179 @@
<?php require '../config.php'; ?>
<?php loadClass('Helper')->authPage(); ?>
<?php
// TODO: This is currently a temporary hack to talk to supervisor on the HTTPD server
function run_supervisor_command($command) {
$supervisor_config_file = '/tmp/supervisorctl.conf';
$port = getenv('SVCTL_LISTEN_PORT');
$user = getenv('SVCTL_USER');
$pass = getenv('SVCTL_PASS');
$content = "[supervisorctl]\n";
$content .= "serverurl=http://httpd:" . $port . "\n";
$content .= "username=" . $user . "\n";
$content .= "password=" . $pass . "\n";
$fp = fopen($supervisor_config_file, 'w');
fwrite($fp, $content);
fclose($fp);
return loadClass('Helper')->exec('supervisorctl -c ' . $supervisor_config_file . ' ' . $command);
}
?>
<?php if ( isset($_POST['watcherd']) && $_POST['watcherd'] == 'reload' ) {
run_supervisor_command('restart watcherd');
sleep(1);
loadClass('Helper')->redirect('/cnc.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo loadClass('Html')->getHead(true); ?>
</head>
<body>
<?php echo loadClass('Html')->getNavbar(); ?>
<div class="container">
<h1>Command & Control</h1>
<br/>
<br/>
<div class="row">
<div class="col-md-12">
<?php
$status_w = run_supervisor_command('status watcherd');
$status_h = run_supervisor_command('status httpd');
$words = preg_split("/\s+/", $status_w);
$data_w = array(
'name' => isset($words[0]) ? $words[0] : '',
'state' => isset($words[1]) ? $words[1] : '',
'pid' => isset($words[3]) ? preg_replace('/,$/', '', $words[3]) : '',
'uptime' => isset($words[5]) ? $words[5] : '',
);
$words = preg_split("/\s+/", $status_h);
$data_h = array(
'name' => isset($words[0]) ? $words[0] : '',
'state' => isset($words[1]) ? $words[1] : '',
'pid' => isset($words[3]) ? preg_replace('/,$/', '', $words[3]) : '',
'uptime' => isset($words[5]) ? $words[5] : '',
);
?>
<h3>Daemon overview</h3><br/>
<p>If you made a change to any vhost settings, you can trigger a manual reload here.</p>
<table class="table table-striped">
<thead class="thead-inverse">
<tr>
<th>Daemon</th>
<th>Status</th>
<th>Pid</th>
<th>Uptime</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $data_w['name']; ?></td>
<td><?php echo $data_w['state']; ?></td>
<td><?php echo $data_w['pid']; ?></td>
<td><?php echo $data_w['uptime']; ?></td>
<td><form method="post"><button type="submit" name="watcherd" value="reload" class="btn btn-primary">Reload</button></form></td>
</tr>
<tr>
<td><?php echo $data_h['name']; ?></td>
<td><?php echo $data_h['state']; ?></td>
<td><?php echo $data_h['pid']; ?></td>
<td><?php echo $data_h['uptime']; ?></td>
<td></td>
</tr>
</tbody>
</table>
<br/>
<br/>
<h3>watcherd stderr</h3>
<br/>
<?php
$output = run_supervisor_command('tail -1000000 watcherd stderr');
echo '<pre>';
foreach(preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) {
if ( strpos($line, "[ERR]") !== false ) {
echo '<span style="color: #ff0000">' . $line . '</span>';
} else if ( strpos($line, "[emerg]") !== false ) {
echo '<span style="color: #ff0000">' . $line . '</span>';
} else if ( strpos($line, "Syntax error") !== false ) {
echo '<span style="color: #ff0000">' . $line . '</span>';
} else if ( strpos($line, "[WARN]") !== false ) {
echo '<span style="color: #ccaa00">' . $line . '</span>';
} else {
echo $line;
}
echo "\n";
}
echo '</pre>';
?>
<h3>watcherd stdout</h3>
<br/>
<?php
$output = run_supervisor_command('tail -1000000 watcherd');
echo '<pre>';
foreach(preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) {
$pos_info = strpos($line, "[INFO]");
$pos_ok = strpos($line, "[OK]");
if ( $pos_ok !== false ) {
echo '<span style="color: #669a00"><strong>' . $line . '</strong></span>';
} else if ( $pos_info !== false && $pos_info == 0 ) {
echo '<span style="color: #0088cd">' . $line . '</span>';
} else {
echo $line;
}
echo "\n";
}
echo '</pre>';
?>
</div>
</div>
</div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?>
<script>
$(function() {
$('.subject').click(function() {
const id = ($(this).attr('id'));
const row = $('#mail-'+id);
row.toggle();
const bodyElement = row.find('.email-body')[0];
if(bodyElement.shadowRoot !== null){
// We've already fetched the message content.
return;
}
bodyElement.attachShadow({ mode: 'open' });
bodyElement.shadowRoot.innerHTML = 'Loading...';
$.get('?get-body=' + id, function(response){
response = JSON.parse(response);
row.find('.raw-email-body').html(response.raw);
const body = response.body;
if(body === null){
row.find('.alert').show();
}
else{
bodyElement.shadowRoot.innerHTML = body;
}
})
})
// Handler for .ready() called.
});
</script>
</body>
</html>

View File

@ -250,7 +250,7 @@ $messages = $MyMbox->get($sortOrderArr);
$.get('?get-body=' + id, function(response){
response = JSON.parse(response);
row.find('.raw-email-body').html(response.raw);
const body = response.body;
if(body === null){
row.find('.alert').show();

View File

@ -24,6 +24,7 @@
<tr>
<th>Project</th>
<th>DocumentRoot</th>
<th>Backend</th>
<th>Config</th>
<th>Valid</th>
<th>URL</th>
@ -31,7 +32,7 @@
</thead>
<tbody>
<?php
$totals = 70;
$totals = 0;
$filler = '&nbsp;';
for ($i=0; $i<$totals; $i++) {
$filler = $filler. '&nbsp;';
@ -41,6 +42,7 @@
<tr>
<td><?php echo $vHost['name'];?></td>
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR');?>/<?php echo $vHost['name'];?>/<?php echo loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR');?></td>
<td><?php echo loadClass('Httpd')->getVhostBackend($vHost['name']); ?></td>
<td>
<a title="Virtual host: <?php echo $vHost['name'];?>.conf" target="_blank" href="/vhost.d/<?php echo $vHost['name'];?>.conf"><i class="fa fa-cog" aria-hidden="true"></i></a>
<?php if (($vhostGen = loadClass('Httpd')->getVhostgenTemplatePath($vHost['name'])) !== false): ?>

View File

@ -18,6 +18,10 @@ class Html
'name' => 'Virtual Hosts',
'path' => '/vhosts.php'
),
array(
'name' => 'C&C',
'path' => '/cnc.php'
),
array(
'name' => 'Emails',
'path' => '/mail.php'

View File

@ -196,6 +196,33 @@ class Httpd extends BaseClass implements BaseInterface
return false;
}
public function getVhostBackend($vhost)
{
$dir = loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR');
$name = 'backend.cfg';
$file = '/shared/httpd/'.$vhost.'/'.$dir.'/'.$name;
if (!file_exists($file)) {
return 'default';
}
$fp = fopen($file, 'r');
$cont = stream_get_contents($fp);
fclose($fp);
// conf:<type>:<proto>:<server>:<port>
$arr = explode(':', $cont);
$type = $arr[1];
$prot = $arr[2];
$addr = ''; // this may contain ':' itself due to IPv6 addresses
for ($i=3; $i<(count($arr)-1); $i++) {
$addr .= $arr[$i];
}
$port = $arr[count($arr) - 1];
return $prot.'://'.$addr.':'.$port;
}
/*********************************************************************************
*

View File

@ -76,7 +76,7 @@ jobs:
cd "${GITHUB_WORKSPACE}/.tests/"
# Test full customization
make configure KEY=DEBUG_COMPOSE_ENTRYPOINT VAL="$(( RANDOM % 3 ))"
make configure KEY=DEBUG_ENTRYPOINT VAL="$(( RANDOM % 3 ))"
make configure KEY=DOCKER_LOGS VAL="$(( RANDOM % 1 ))"
make configure KEY=TLD_SUFFIX VAL=loc2
make configure KEY=TIMEZONE VAL='Europe/Berlin'

View File

@ -51,7 +51,7 @@ pull: ../.env
###
start: ../.env
@$(MAKE) --no-print-directory configure KEY=HOST_PATH_HTTPD_DATADIR VAL=.tests/www
@$(MAKE) --no-print-directory configure KEY=DEBUG_COMPOSE_ENTRYPOINT VAL=2
@$(MAKE) --no-print-directory configure KEY=DEBUG_ENTRYPOINT VAL=3
@$(MAKE) --no-print-directory configure KEY=NEW_UID VAL=$$(id -u)
@$(MAKE) --no-print-directory configure KEY=NEW_GID VAL=$$(id -g)
@$(PWD)/scripts/compose-start.sh

View File

@ -6,6 +6,77 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl
## Unreleased
## Release v3.0.0-beta-0.1 (2022-12-24) 🎅🎄🎁
This is a beta release, using a completely rewritten set of HTTPD server, which allow easy reverse Proxy integration and different PHP versions per project:
* https://github.com/devilbox/docker-nginx-stable/pull/55
* https://github.com/devilbox/docker-nginx-mainline/pull/57
* https://github.com/devilbox/docker-apache-2.2/pull/53
* https://github.com/devilbox/docker-apache-2.4/pull/54
Once it has been tested by the community, and potential errors have been addressed, a new major version will be released.
**IMPORTANT:** This release required you to copy `env-example` over onto `.env` due to some changes in variables.
### TL;DR
1. **Multiple PHP Versions**<br/>
Here is an example to run one project with a specific PHP version<br/>
```bash
# Enable all PHP versions
cp compose/docker-compose.override.yml-php-multi.yml docker-compose.override.yml
# Start default set and php80
docker-compose up php httpd bind php80
```
file: `/shared/httpd/<project>/.devilbox/backend.cfg`
```
conf:phpfpm:tcp:php80:9000
```
2. **Automated Reverse Proxy setup**<br/>
Here is an example to proxy one project to a backend service (e.g. NodeJS or Python application, which runs in the PHP container on port 3000)<br/>
file: `/shared/httpd/<project>/.devilbox/backend.cfg`
```
conf:rproxy:http:127.0.0.1:3000
```
#### PHP hostnames and IP addresses
| PHP Version | Hostname | IP address |
|-------------|----------|----------------|
| 5.4 | php54 | 172.16.238.201 |
| 5.5 | php55 | 172.16.238.202 |
| 5.6 | php56 | 172.16.238.203 |
| 7.0 | php70 | 172.16.238.204 |
| 7.1 | php71 | 172.16.238.205 |
| 7.2 | php72 | 172.16.238.206 |
| 7.3 | php73 | 172.16.238.207 |
| 7.4 | php74 | 172.16.238.208 |
| 8.0 | php80 | 172.16.238.209 |
| 8.1 | php81 | 172.16.238.210 |
| 8.2 | php82 | 172.16.238.211 |
### Fixed
- Fixed Protocol substitution bug in Reverse Proxy generation for Apache 2.2 and Apache 2.4 [vhost-gen #49](https://github.com/devilbox/vhost-gen/pull/49) [vhost-gen #50](https://github.com/devilbox/vhost-gen/pull/50)
- Fixed missing module `mod_proxy_html` in Apache 2.4 as per requirement from `vhost-gen` for Reverse Proxy setup
- Fixed encoding issue with Apache 2.4 Reverse Proxy by enabling `mod_xml2enc` module (Required by `mod_proxy_html`)
- Allow to run different PHP versions per project. fixes [#146](https://github.com/cytopia/devilbox/issues/146)
### Added
- New HTTPD server capable of auto reverse proxy creation (and different PHP versions per project)
- Intranet: Added Command & Control center to view watcherd logs and retrigger config in case of vhost changes
- Intranet: vhost page now also shows the configured Backend
- Environment variable `DEVILBOX_HTTPD_MGMT_PASS`
- Environment variable `DEVILBOX_HTTPD_MGMT_USER`
- New Docker Compose Override file `docker-compose.override.yml-php-multi.yml` (allows to run multiple PHP versions).
- Update Bind to latest version
### Changed
- Disabled `psr` extension by default [php-psr #78](https://github.com/jbboehr/php-psr/issues/78#issuecomment-722290110)
- Disabled `phalcon` extension by default
- Environment variable `DEBUG_COMPOSE_ENTRYPOINT` renamed to `DEBUG_ENTRYPOINT`
- Environment variable `HTTPD_TIMEOUT_TO_PHP_FPM` renamed to `HTTPD_BACKEND_TIMEOUT`
## Release v2.4.0 (2022-12-18)
This release might be a bit bumpy due to a massive amount of changes in upstream projects. If you encounter issues, please do raise tickets.

View File

@ -377,7 +377,7 @@ Every single attachable container comes with many different versions. In order t
<tr>
<td></td>
<td></td>
<td><a target="_blank" title="PHP 8.2" href="https://github.com/devilbox/docker-php-fpm">8.2</a></a><sup>[2]</sup></td>
<td><a target="_blank" title="PHP 8.2" href="https://github.com/devilbox/docker-php-fpm">8.2</a><!-- <sup>[2]</sup> --></td>
<td></td>
<td></td>
<td></td>
@ -391,7 +391,7 @@ Every single attachable container comes with many different versions. In order t
<small><strong><sup>[1]</sup></strong> <strong>PHP 5.2</strong> is available to use, but it is not officially supported. The Devilbox intranet does not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk.</small>
<small><strong><sup>[2]</sup></strong> <strong>PHP 8.2</strong> is an upcoming unreleased versions of PHP, which is directly built out of their [official git branches](https://github.com/php/php-src/) every night to assure you will leverage their latest features.</small>
<!-- <small><strong><sup>[2]</sup></strong> <strong>PHP 8.2</strong> is an upcoming unreleased versions of PHP, which is directly built out of their [official git branches](https://github.com/php/php-src/) every night to assure you will leverage their latest features.</small> -->
> **Documentation:**
> [Change container versions](https://devilbox.readthedocs.io/en/latest/getting-started/change-container-versions.html)
@ -558,10 +558,6 @@ The Devilbox has everything setup for you. The only thing you will have to insta
<td>:star: Custom PHP config</td>
<td>Overwrite any setting for PHP.</td>
</tr>
<tr>
<td>:star: Custom PHP modules</td>
<td>Load custom PHP modules on the fly.</td>
</tr>
<tr>
<td>:star: Email catch-all</td>
<td>All outgoing emails are catched and will be presented in the included intranet.</td>
@ -611,7 +607,7 @@ The following batteries are available in the Devilbox intranet by default:
<td><a href="https://www.phpmyadmin.net">phpMyAdmin</a></td>
<td><a href="http://phppgadmin.sourceforge.net">phpPgAdmin</a></td>
<td><a href="https://github.com/sasanrose/phpredmin">phpRedMin</a></td>
<td><a href="https://github.com/elijaa/phpmemcachedadmin">PHPMemcached Admin</a></td>
<td><a href="https://github.com/elijaa/phpmemcachedadmin">PHP Memcached Admin</a></td>
<td><a href="https://github.com/PeeHaa/OpCacheGUI">OpCache GUI</a></td>
<td>Mail viewer</td>
</tr>
@ -647,10 +643,6 @@ The following tools will assist you on creating new projects easily as well as h
<td>:wrench: <a href="https://github.com/cytopia/linkcheck">linkcheck</a></td>
<td><code>linkcheck</code> is a command line tool that searches for URLs in files (optionally limited by extension) and validates their HTTP status code.</td>
</tr>
<tr>
<td>:wrench: <a href="https://brew.sh/">homebrew</a></td>
<td><code>brew</code> is a MacOS Homenbrew for Linux.</td>
</tr>
<tr>
<td>:wrench: <a href="https://github.com/DavidAnson/markdownlint">markdownlint</a></td>
<td><code>markdownlint</code> is a markdown linter.</td>
@ -708,11 +700,9 @@ The following tools will assist you on creating new projects easily as well as h
Well-known and popular tools will be at your service as well:
<a target="_blank" title="Ansible" href="https://www.ansible.com/"><img width="64" style="width:64px" src="docs/img/logo_tools/ansible.png" alt="Devilbox"/></a>
<a target="_blank" title="CodeCeption" href="https://codeception.com/"><img width="64" style="width:64px" src="docs/img/logo_tools/codeception.png" alt="Devilbox"/></a>
<a target="_blank" title="Composer" href="https://getcomposer.org"><img width="64" style="width:64px" src="docs/img/logo_tools/composer.png" alt="Devilbox"/></a>
<a target="_blank" title="Drupal Console" href="https://drupalconsole.com"><img width="64" style="battery" src="docs/img/logo_tools/drupal-console.png" alt="Devilbox"/></a>
<a target="_blank" title="Drush" href="https://www.drupal.org/project/drush"><img width="64" style="width:64px;" src="docs/img/logo_tools/drush.png" alt="Devilbox"/></a>
<a target="_blank" title="ESLint" href="https://eslint.org/"><img width="64" style="width:64px;" src="docs/img/logo_tools/eslint.png" alt="Devilbox"/></a>
<a target="_blank" title="Git" href="https://git-scm.com"><img width="64" style="width:64px;" src="docs/img/logo_tools/git.png" alt="Devilbox"/></a>
<a target="_blank" title="Gulp" href="https://gulpjs.com/"><img width="64" style="width:64px;" src="docs/img/logo_tools/gulp.png" alt="Devilbox"/></a>
@ -856,10 +846,6 @@ PHP modules can be enabled or disabled on demand to reflect the state of your ta
> **Documentation:**
> [Enable/disable PHP modules](https://devilbox.readthedocs.io/en/latest/intermediate/enable-disable-php-modules.html)
#### Custom PHP Modules
You can also copy any custom modules into `mod/(php-fpm)-<VERSION>` and add a custom `*.ini` file to load them.
#### Supported PHP Frameworks
As far as tested there are no limitations and you can use any Framework or CMS just as you would on your live environment. Below are a few examples of extensively tested Frameworks and CMS:
@ -980,6 +966,7 @@ To increase visibility and bug-free operation:
* Star this project
* Open up issues for bugs and feature requests
* Clone this project and submit fixes or features
* Visit the [Devilbox Discord Chat](https://discord.gg/2wP3V6kBj4) to exchange about setups
* Visit the [Devilbox Community Forums](https://devilbox.discourse.group) for announcements and to help others
Additionally you can [subscribe to Devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox),

View File

@ -3,6 +3,17 @@
This document will hold all information on how to update between major versions.
## Update from `v2.4.0` to `v3.0.0` (`v3.0.0-beta-1`)
**PR:** https://github.com/cytopia/devilbox/pull/942
This PR introduces new `.env` variables, so you are required to copy `env-example` over to `.env`.
Also ensure to stop and remove containers.
```bash
docker-compose stop
docker-compose rm -f
```
## Update from `v1.8.1` to `v1.8.2`
**PR:** https://github.com/cytopia/devilbox/pull/750

View File

@ -0,0 +1,5 @@
[mysqld]
;key_buffer_size=16M
[mysqldump]
;quick

View File

@ -0,0 +1,5 @@
[mysqld]
;key_buffer_size=16M
[mysqldump]
;quick

View File

@ -0,0 +1,5 @@
[mysqld]
;key_buffer_size=16M
[mysqldump]
;quick

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 5.3 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 5.4 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 5.5 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 5.6 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 7.0 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 7.1 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 7.2 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 7.3 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 7.4 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 8.0 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 8.1 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP-FPM config directory
# PHP-FPM 8.2 config directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 5.2 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 5.3 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 5.4 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 5.5 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 5.6 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 7.0 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 7.1 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 7.2 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 7.3 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 7.4 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 8.0 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 8.1 ini directory
## General

View File

@ -1,4 +1,4 @@
# PHP ini directory
# PHP 8.2 ini directory
## General

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 5.2 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 5.3 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 5.4 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 5.5 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 5.6 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 7.0 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 7.1 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 7.2 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 7.3 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 7.4 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 8.0 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 8.1 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -1,4 +1,4 @@
# Custom startup scripts (per PHP version)
# Custom startup scripts (for PHP 8.2 only)
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
This is useful to apply your custom settings such as installing software that usually requires

View File

@ -219,13 +219,13 @@ print_head_1 "Checking .env file values"
WRONG_ENV_FILES_VALUES=0
DEBUG_COMPOSE_ENTRYPOINT="$( get_env_value "DEBUG_COMPOSE_ENTRYPOINT" )"
if [ "${DEBUG_COMPOSE_ENTRYPOINT}" != "0" ] && [ "${DEBUG_COMPOSE_ENTRYPOINT}" != "1" ] && [ "${DEBUG_COMPOSE_ENTRYPOINT}" != "2" ]; then
log_err "Variable 'DEBUG_COMPOSE_ENTRYPOINT' should be 0, 1 or 2. Has: ${DEBUG_COMPOSE_ENTRYPOINT}"
DEBUG_ENTRYPOINT="$( get_env_value "DEBUG_ENTRYPOINT" )"
if [ "${DEBUG_ENTRYPOINT}" != "0" ] && [ "${DEBUG_ENTRYPOINT}" != "1" ] && [ "${DEBUG_ENTRYPOINT}" != "2" ] && [ "${DEBUG_ENTRYPOINT}" != "3" ] && [ "${DEBUG_ENTRYPOINT}" != "3" ]; then
log_err "Variable 'DEBUG_ENTRYPOINT' should be 0, 1 or 2. Has: ${DEBUG_ENTRYPOINT}"
RET_CODE=$(( RET_CODE + 1))
WRONG_ENV_FILES_VALUES=1
else
log_debug "Variable 'DEBUG_COMPOSE_ENTRYPOINT' has correct value: ${DEBUG_COMPOSE_ENTRYPOINT}"
log_debug "Variable 'DEBUG_ENTRYPOINT' has correct value: ${DEBUG_ENTRYPOINT}"
fi
DOCKER_LOGS="$( get_env_value "DOCKER_LOGS" )"
@ -430,7 +430,7 @@ fi
#--------------------------------------------------------------------------------------------------
# Ensure cfg/, mod/ and log/ directories exist
# Ensure cfg/ and log/ directories exist
#--------------------------------------------------------------------------------------------------
print_head_1 "Checking required Devilbox core directories exist"
@ -464,21 +464,6 @@ if [ "${DIR_MISSING}" = "0" ]; then
log_ok "All PHP log/ sub directories are present"
fi
# /mod/php-fpm-VERSION
DIR_MISSING=0
while read -r php_version; do
if [ ! -d "mod/php-fpm-${php_version}" ]; then
log_err "Directory 'mod/php-fpm-${php_version}' is missing"
RET_CODE=$(( RET_CODE + 1))
DIR_MISSING=1
else
log_debug "Directory 'mod/php-fpm-${php_version}' is present"
fi
done < <(grep -E '^#?PHP_SERVER=' env-example | awk -F'=' '{print $2}')
if [ "${DIR_MISSING}" = "0" ]; then
log_ok "All PHP mod/ sub directories are present"
fi
# /cfg/apache|nginx-VERSION
DIR_MISSING=0
while read -r httpd_version; do
@ -522,7 +507,6 @@ DEVILBOX_DIRS=(
"cfg"
"compose"
"log"
"mod"
"supervisor"
)
@ -591,7 +575,6 @@ DEVILBOX_DIRS=(
"ca"
"cfg"
"compose"
"mod"
"supervisor"
)

View File

@ -0,0 +1,231 @@
# vim: set ft=yaml:
---
version: '2.3'
# ------------------------------------------------------------
# Yaml Default
# ------------------------------------------------------------
###
### Default PHP-FPM config
###
x-app: &default-php
env_file:
- ./.env
environment:
# Debug/Logging
- DEBUG_ENTRYPOINT=${DEBUG_ENTRYPOINT:-2}
- DOCKER_LOGS=1
# Enable/Disable PHP Modules
- ENABLE_MODULES=${PHP_MODULES_ENABLE}
- DISABLE_MODULES=${PHP_MODULES_DISABLE}
# Mail-catching
- ENABLE_MAIL=${PHP_MAIL_CATCH_ALL:-2}
dns:
- 172.16.238.100
depends_on:
- bind
# ------------------------------------------------------------
# PHP Services
# ------------------------------------------------------------
services:
php54:
<<: *default-php
image: devilbox/php-fpm:5.4-prod-0.147
hostname: php54
networks:
app_net:
ipv4_address: 172.16.238.201
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.4:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-5.4:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-5.4:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php55:
<<: *default-php
image: devilbox/php-fpm:5.5-prod-0.147
hostname: php55
networks:
app_net:
ipv4_address: 172.16.238.202
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.5:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-5.5:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-5.5:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php56:
<<: *default-php
image: devilbox/php-fpm:5.6-prod-0.147
hostname: php56
networks:
app_net:
ipv4_address: 172.16.238.203
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.6:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-5.6:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-5.6:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php70:
<<: *default-php
image: devilbox/php-fpm:7.0-prod-0.147
hostname: php70
networks:
app_net:
ipv4_address: 172.16.238.204
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.0:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-7.0:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.0:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php71:
<<: *default-php
image: devilbox/php-fpm:7.1-prod-0.147
hostname: php71
networks:
app_net:
ipv4_address: 172.16.238.205
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.1:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-7.1:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.1:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php72:
<<: *default-php
image: devilbox/php-fpm:7.2-prod-0.147
hostname: php72
networks:
app_net:
ipv4_address: 172.16.238.206
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.2:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-7.2:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.2:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php73:
<<: *default-php
image: devilbox/php-fpm:7.3-prod-0.147
hostname: php73
networks:
app_net:
ipv4_address: 172.16.238.207
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.3:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-7.3:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.3:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php74:
<<: *default-php
image: devilbox/php-fpm:7.4-prod-0.147
hostname: php74
networks:
app_net:
ipv4_address: 172.16.238.208
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.4:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-7.4:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.4:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php80:
<<: *default-php
image: devilbox/php-fpm:8.0-prod-0.147
hostname: php80
networks:
app_net:
ipv4_address: 172.16.238.209
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-8.0:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-8.0:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-8.0:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php81:
<<: *default-php
image: devilbox/php-fpm:8.1-prod-0.147
hostname: php81
networks:
app_net:
ipv4_address: 172.16.238.210
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-8.1:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-8.1:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-8.1:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php82:
<<: *default-php
image: devilbox/php-fpm:8.2-prod-0.147
hostname: php82
networks:
app_net:
ipv4_address: 172.16.238.211
volumes:
# Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-8.2:/etc/php-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-fpm-8.2:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-8.2:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

View File

@ -34,7 +34,7 @@ services:
# Bind (DNS Server)
# ------------------------------------------------------------
bind:
image: cytopia/bind:alpine-0.34
image: cytopia/bind:alpine-0.35
hostname: bind
restart: always
ports:
@ -46,7 +46,7 @@ services:
##
## Debug?
##
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
- DEBUG_ENTRYPOINT=${DEBUG_ENTRYPOINT:-2}
##
## Memory consumption
@ -112,11 +112,17 @@ services:
- ./.env
environment:
##
## Supervisord Management (to connect to HTTPD supvervisord)
##
- SVCTL_LISTEN_PORT=9001
- SVCTL_USER=${DEVILBOX_HTTPD_MGMT_USER:-supervisor}
- SVCTL_PASS=${DEVILBOX_HTTPD_MGMT_PASS:-mypassword}
##
## Debug/Logging
##
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
- DEBUG_COMPOSE_ENTRYPOINT
- DEBUG_ENTRYPOINT=${DEBUG_ENTRYPOINT:-2}
- DOCKER_LOGS
##
@ -197,10 +203,6 @@ services:
# to overwrite the default PHP-FPM configuration
- ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
# Mount devilbox user-defined *.so files in order
# to load custom PHP modules
- ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS}
# Mount devilbox user-defined PHP-FPM startup *.sh scripts
- ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.1.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
@ -225,16 +227,26 @@ services:
# Web Server
# ------------------------------------------------------------
httpd:
image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-0.48
image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-1.0-beta1
hostname: httpd
environment:
##
## Supervisord Management
##
- SVCTL_ENABLE=1
- SVCTL_LISTEN_ADDR=0.0.0.0
- SVCTL_LISTEN_PORT=9001
- SVCTL_REMOTE_LOGS_ENABLE=1
- SVCTL_USER=${DEVILBOX_HTTPD_MGMT_USER:-supervisor}
- SVCTL_PASS=${DEVILBOX_HTTPD_MGMT_PASS:-mypassword}
##
## Debug/Logging
##
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
- DEBUG_RUNTIME=${DEBUG_COMPOSE_ENTRYPOINT}
- DEBUG_ENTRYPOINT=${DEBUG_ENTRYPOINT:-2}
- DEBUG_RUNTIME=1
- DOCKER_LOGS
##
@ -268,25 +280,23 @@ services:
- MAIN_VHOST_SSL_TYPE=${HTTPD_VHOST_SSL_TYPE:-both}
- MAIN_VHOST_SSL_GEN=1
- MAIN_VHOST_SSL_CN=${DEVILBOX_UI_SSL_CN:-localhost}
- MAIN_VHOST_BACKEND=conf:phpfpm:tcp:172.16.238.10:9000
- MAIN_VHOST_BACKEND_TIMEOUT=${HTTPD_BACKEND_TIMEOUT:-180}
- MAIN_VHOST_ALIASES_ALLOW=/devilbox-api/:/var/www/default/api, /vhost.d/:/etc/httpd
##
## Enable Mass Vhosts
##
- MASS_VHOST_ENABLE=1
- MASS_VHOST_TLD=.${TLD_SUFFIX}
- MASS_VHOST_DOCROOT=${HTTPD_DOCROOT_DIR}
- MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR}
- MASS_VHOST_TLD_SUFFIX=.${TLD_SUFFIX}
- MASS_VHOST_DOCROOT_DIR=${HTTPD_DOCROOT_DIR}
- MASS_VHOST_TEMPLATE_DIR=${HTTPD_TEMPLATE_DIR}
- MASS_VHOST_SSL_TYPE=${HTTPD_VHOST_SSL_TYPE:-both}
- MASS_VHOST_SSL_GEN=1
##
## PHP-FPM Remote Server
##
- COMPAT=${PHP_SERVER}
- PHP_FPM_ENABLE=1
- PHP_FPM_SERVER_ADDR=172.16.238.10
- PHP_FPM_SERVER_PORT=9000
- PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180}
- MASS_VHOST_BACKEND=conf:phpfpm:tcp:172.16.238.10:9000
- MASS_VHOST_BACKEND_REWRITE=file:backend.cfg
- MASS_VHOST_BACKEND_TIMEOUT=${HTTPD_BACKEND_TIMEOUT:-180}
- MASS_VHOST_ALIASES_ALLOW=/devilbox-api/:/var/www/default/api:http(s)?://(.*)$$
ports:
# ---- Format: ----
@ -315,7 +325,7 @@ services:
- ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d:rw${MOUNT_OPTIONS}
# Mount logs
- ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/httpd:rw${MOUNT_OPTIONS}
# Certificate Authority public key
- ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}

View File

@ -12,8 +12,8 @@
.. |ext_lnk_doc_bind_soa| raw:: html
<a target="_blank" href="https://bind9.readthedocs.io/en/latest/introduction.html?highlight=soa#secondary-servers">
BIND SOA <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
<a target="_blank" href="https://bind9.readthedocs.io/en/latest/reference.html">
BIND Reference <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
</a>
.. |ext_lnk_doc_wiki_database_timezones| raw:: html

View File

@ -72,7 +72,7 @@
.. |ext_lnk_example_magento2_documentation| raw:: html
<a target="_blank" href="https://devdocs.magento.com/guides/v2.2/install-gde/bk-install-guide.html">
<a target="_blank" href="https://docs.magento.com/user-guide/v2.3/magento/installation.html">
Official Magento 2 Documentation <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
</a>

View File

@ -36,7 +36,7 @@
.. |ext_lnk_xdebug_ide_atom_php_debug| raw:: html
<a target="_blank" href="https://atom.io/packages/php-debug">
<a target="_blank" href="https://github.blog/2022-06-08-sunsetting-atom/">
php-debug <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
</a>

View File

@ -1,11 +1,11 @@
.. |ext_lnk_php_community_github_announce| raw:: html
.. |ext_lnk_devilbox_pr_announce| raw:: html
<a target="_blank" href="https://github.com/devilbox/docker-php-fpm-community/">
<strong>PHP-FPM Community <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" /></strong>
<a target="_blank" href="https://github.com/cytopia/devilbox/pull/942">
<strong>Release v3.0.0-beta-0.1 <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" /></strong>
</a>
.. attention::
You can now create your own **custom flavour** of PHP-FPM Community images and easily add them to the Devilbox: |ext_lnk_php_community_github_announce|
You can now run different PHP versions per project: |ext_lnk_devilbox_pr_announce|

View File

@ -67,7 +67,7 @@ First you simply copy the while definition of the bind service from ``docker-com
##
## Debug?
##
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
- DEBUG_ENTRYPOINT=${DEBUG_ENTRYPOINT}
- DOCKER_LOGS=1
##

View File

@ -32,18 +32,18 @@ to ``.env`` to initially create it with sane defaults.
Core settings
=============
DEBUG_COMPOSE_ENTRYPOINT
------------------------
DEBUG_ENTRYPOINT
----------------
This variable controls the docker-compose log verbosity during service startup.
When set to ``1`` verbose output as well as executed commands are shown.
When set to ``0`` only warnings and errors are shown.
+------------------------------+----------------+---------------+
| Name | Allowed values | Default value |
+==============================+================+===============+
| ``DEBUG_COMPOSE_ENTRYPOINT`` | ``0`` or ``1`` | ``1`` |
+------------------------------+----------------+---------------+
+------------------------------+-----------------------------------+---------------+
| Name | Allowed values | Default value |
+==============================+===================================+===============+
| ``DEBUG_ENTRYPOINT`` | ``0``, ``1``, ``2``, ``3``, ``4`` | ``2`` |
+------------------------------+-----------------------------------+---------------+
.. _env_docker_logs:
@ -1505,8 +1505,8 @@ changing the server name or adding locations to other assets.
.. _env_httpd_timeout_to_php_fpm:
HTTPD_TIMEOUT_TO_PHP_FPM
^^^^^^^^^^^^^^^^^^^^^^^^
HTTPD_BACKEND_TIMEOUT
^^^^^^^^^^^^^^^^^^^^^
This variable specifies after how many seconds the webserver should quit an unanswered connection
to PHP-FPM.
@ -1515,17 +1515,17 @@ Ensure that this value is higher than PHP's ``max_execution_time``, otherwise th
could still run and the webserver will simply drop the connection before getting an answer
by PHP.
If ``HTTPD_TIMEOUT_TO_PHP_FPM`` is smaller then ``max_execution_time`` and a script runs longer
If ``HTTPD_BACKEND_TIMEOUT`` is smaller then ``max_execution_time`` and a script runs longer
than ``max_execution_time``, you will get a: ``504 Gateway timeout`` in the browser.
If ``HTTPD_TIMEOUT_TO_PHP_FPM`` is greater then ``max_execution_time`` and a script runs longer
If ``HTTPD_BACKEND_TIMEOUT`` is greater then ``max_execution_time`` and a script runs longer
than ``max_execution_time``, you will get a proper PHP error message in the browser.
+------------------------------+-------------------+------------------+
| Name | Allowed values | Default value |
+==============================+===================+==================+
| ``HTTPD_TIMEOUT_TO_PHP_FPM`` | positive integer | ``180`` |
| ``HTTPD_BACKEND_TIMEOUT`` | positive integer | ``180`` |
+------------------------------+-------------------+------------------+
HTTPD_NGINX_WORKER_PROCESSES

View File

@ -11,7 +11,7 @@ Enable/disable PHP modules
.. contents:: :local:
.. seealso::
https://github.com/devilbox/docker-php-fpm#user-content-php-modules
https://github.com/devilbox/docker-php-fpm/blob/master/doc/php-modules.md
Follow the link to see all available PHP modules for each different PHP-FPM server version.

View File

@ -28,10 +28,12 @@
### Show all executed commands in each
### docker image during docker-compose up?
###
### 0: Quiet
### 1: Verbose
### 2: More verbose
DEBUG_COMPOSE_ENTRYPOINT=2
### 0: Errors
### 1: Errors, Warnings
### 2: Errors, Warnings, Infos (Recommended)
### 3: Errors, Warnings, Infos, Debug
### 4: Errors, Warnings, Infos, Debug, Trace
DEBUG_ENTRYPOINT=2
###
@ -236,6 +238,12 @@ DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=1
###
DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=1
###
### HTTPD Supvervisord management
###
DEVILBOX_HTTPD_MGMT_USER=supervisord
DEVILBOX_HTTPD_MGMT_PASS=mypassword
################################################################################
@ -515,7 +523,7 @@ PHP_MODULES_ENABLE=
###
### PHP_MODULES_DISABLE=xdebug,imagick,swoole
###
PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole,psr,phalcon
###
@ -609,13 +617,16 @@ HTTPD_TEMPLATE_DIR=.devilbox
###
### Webserver timeout (in seconds) to upstream PHP-FPM server
### Remote (Upstream) Backend Timeout
###
### This value should be greater than PHP's max_execution_time,
### otherwise the php script could still run and the webserver will
### simply drop the connection before getting an answer by PHP.
### This setting specifies the Timeout for a remote Backend server,
### such as PHP-FPM or a Reverse Proxy.
###
HTTPD_TIMEOUT_TO_PHP_FPM=180
### As for PHP, keep in mind that this value should be greater than
### PHP's max_execution_time,otherwise the php script could still
### run and the webserver will simply drop the connection before getting an answer by PHP.
###
HTTPD_BACKEND_TIMEOUT=180
###

View File

@ -1,3 +0,0 @@
# Devilbox user-defined PHP modules
Use this folders to add your custom PHP modules.