Merge pull request #943 from cytopia/release/v3.0.0-beta-0.2

Release/v3.0.0 beta 0.2
This commit is contained in:
cytopia 2022-12-27 15:28:16 +01:00 committed by GitHub
commit 81c9bb0a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 329 additions and 88 deletions

View File

@ -13,8 +13,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 = 'v3.0.0-beta-0.1'; $DEVILBOX_VERSION = 'v3.0.0-beta-0.2';
$DEVILBOX_DATE = '2022-12-24'; $DEVILBOX_DATE = '2022-12-27';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json';
// //

View File

@ -31,13 +31,6 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php
$totals = 0;
$filler = '&nbsp;';
for ($i=0; $i<$totals; $i++) {
$filler = $filler. '&nbsp;';
}
?>
<?php foreach ($vHosts as $vHost): ?> <?php foreach ($vHosts as $vHost): ?>
<tr> <tr>
<td><?php echo $vHost['name'];?></td> <td><?php echo $vHost['name'];?></td>
@ -46,11 +39,13 @@
<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> <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): ?> <?php if (($vhostGen = loadClass('Httpd')->getVhostgenTemplatePath($vHost['name'])) !== false): ?>
<a title="vhost-gen: <?php echo basename($vhostGen);?> for <?php echo $vHost['name'];?>" href="/info_vhostgen.php?name=<?php echo $vHost['name'];?>"><i class="fa fa-filter" aria-hidden="true"></i></a> <a title="vhost-gen: <?php echo basename($vhostGen);?> for <?php echo $vHost['name'];?>" href="/info_vhostgen.php?name=<?php echo $vHost['name'];?>">
<i class="fa fa-filter" aria-hidden="true"></i>
</a>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td class="text-xs-center text-xs-small" id="valid-<?php echo $vHost['name'];?>">&nbsp;&nbsp;&nbsp;</td> <td style="min-width:60px;" class="text-xs-center text-xs-small" id="valid-<?php echo $vHost['name'];?>"></td>
<td id="href-<?php echo $vHost['name'];?>"><?php echo $filler;?></td> <td style="min-width:260px;" id="href-<?php echo $vHost['name'];?>"></td>
</tr> </tr>
<input type="hidden" name="vhost[]" class="vhost" value="<?php echo $vHost['name'];?>" /> <input type="hidden" name="vhost[]" class="vhost" value="<?php echo $vHost['name'];?>" />
<?php endforeach; ?> <?php endforeach; ?>
@ -65,6 +60,60 @@
</div> </div>
</div> </div>
<?php
$cmd="netstat -wneeplt 2>/dev/null | sort | grep '\s1000\s' | awk '{print \"app=\"\$9\"|addr=\"\$4}' | sed 's/\(app=\)\([0-9]*\/\)/\\1/g' | sed 's/\(.*\)\(:[0-9][0-9]*\)/\\1|port=\\2/g' | sed 's/port=:/port=/g'";
$output=loadClass('Helper')->exec($cmd);
$daemons = array();
foreach (preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) {
$section = preg_split("/\|/", $line);
if (count($section) == 3) {
$tool = preg_split("/=/", $section[0]);
$addr = preg_split("/=/", $section[1]);
$port = preg_split("/=/", $section[2]);
$tool = $tool[1];
$addr = $addr[1];
$port = $port[1];
$daemons[] = array(
'tool' => $tool,
'addr' => $addr,
'port' => $port
);
}
}
?>
<?php if (count($daemons)): ?>
<br/>
<br/>
<div class="row">
<div class="col-md-12">
<h2>Local listening daemons</h2>
<table class="table table-striped">
<thead class="thead-inverse">
<tr>
<th>Application</th>
<th>Listen Address</th>
<th>Listen Port</th>
<th>Host</th>
</tr>
</thead>
<tbody>
<?php foreach ($daemons as $daemon): ?>
<tr>
<td><?php echo $daemon['tool']; ?></td>
<td><?php echo $daemon['addr']; ?></td>
<td><?php echo $daemon['port']; ?></td>
<td>php (172.16.238.10)</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<?php endif; ?>
</div><!-- /.container --> </div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?> <?php echo loadClass('Html')->getFooter(); ?>
@ -83,7 +132,7 @@
var el_valid; var el_valid;
var el_href; var el_href;
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200 || this.status == 426) {
el_valid = document.getElementById('valid-' + vhost); el_valid = document.getElementById('valid-' + vhost);
el_href = document.getElementById('href-' + vhost); el_href = document.getElementById('href-' + vhost);
error = this.responseText; error = this.responseText;
@ -129,13 +178,14 @@
var el_href = document.getElementById('href-' + vhost); var el_href = document.getElementById('href-' + vhost);
var error = this.responseText; var error = this.responseText;
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && (this.status == 200 || this.status == 426)) {
clearTimeout(xmlHttpTimeout); clearTimeout(xmlHttpTimeout);
el_valid.className += ' bg-success'; el_valid.className += ' bg-success';
if (el_valid.innerHTML != 'WARN') { if (el_valid.innerHTML != 'WARN') {
el_valid.innerHTML = 'OK'; el_valid.innerHTML = 'OK';
} }
el_href.innerHTML = '<a target="_blank" href="'+proto+'//'+name+port+'">'+name+port+'</a>' + el_href.innerHTML; //el_href.innerHTML = '(<a target="_blank" href="'+proto+'//localhost/devilbox-project/'+name+'">ext</a>) <a target="_blank" href="'+proto+'//'+name+port+'">'+name+port+'</a>' + el_href.innerHTML;
el_href.innerHTML = '<a target="_blank" href="'+proto+'//'+name+port+'">'+name+port+'</a>';
} else { } else {
//console.log(vhost); //console.log(vhost);
} }

View File

@ -29,10 +29,18 @@ class Httpd extends BaseClass implements BaseInterface
$url = 'http://'.$domain; $url = 'http://'.$domain;
$error = array(); $error = array();
// 1. Check htdocs folder
if (!$this->_is_valid_dir($docroot)) { $backend = $this->getVhostBackend($vhost);
$error[] = 'error'; $pos_def = strpos($backend, 'default');
$error[] = 'Missing <strong>'.$htdocs.'</strong> directory in: <strong>'.loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vhost.'/</strong>'; $pos_phpfpm = strpos($backend, 'tcp://');
// Only if backend 'default' or 'phpfpm', we need a htdocs/ directory
if ( ($pos_def !== false && $pos_def == 0) || ($pos_phpfpm !== false && $pos_phpfpm == 0) ) {
// 1. Check htdocs folder
if (!$this->_is_valid_dir($docroot)) {
$error[] = 'error';
$error[] = 'Missing <strong>'.$htdocs.'</strong> directory in: <strong>'.loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vhost.'/</strong>';
}
} }
// 2. Check internal DNS server // 2. Check internal DNS server

View File

@ -36,7 +36,7 @@ jobs:
target: target:
- build - build
- linkcheck - linkcheck
- linkcheck2 # - linkcheck2
name: "[Docs ${{ matrix.target }}]" name: "[Docs ${{ matrix.target }}]"
steps: steps:

View File

@ -6,6 +6,47 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl
## Unreleased ## Unreleased
## Release v3.0.0-beta-0.2 (2022-12-27)
The Backend configuration now supports websockets as well:
file: `/shared/httpd/<project>/.devilbox/backend.cfg`
```bash
# PHP-FPM backend
conf:phpfpm:tcp:php80:9000
# HTTP Reverse Proxy backend
conf:rproxy:http:172.16.238.10:3000
# HTTPS Reverse Proxy backend
conf:rproxy:https:172.16.238.10:3000
# Websocket Reverse Proxy backend
conf:rproxy:ws:172.16.238.10:3000
# SSL Websocket Reverse Proxy backend
conf:rproxy:wss:172.16.238.10:3000
```
Once you're done with `backend.cfg` changes, head over to the Intranet C&C page (http://localhost/cnc.php) and Reload `watcherd`.
### Fixed
- Intranet: vhost overview: allow HTTP 426 to succeed in vhost page (websocket projects)
- Intranet: vhost overview: Reverse Proxy or Websocket backends do not require a `htdocs/` dir for healthcheck
- Fixed reverse proxy template generation for Apache 2.2 and Apache 2.4 [vhost-gen #51](https://github.com/devilbox/vhost-gen/pull/51)
- Fixed Nginx hash bucket size length to allow long hostnames
### Added
- Reverse Proxy automation for websocket projects (`ws://<host>:<port>` or `wss:<host>:<port>`) (Does not work with Apache 2.2)
- Added tool `wscat` to be able to test websocket connections
- Intranet: vhost overview now also shows websocket projects
### Changed
- Do not mount any startup/autostart script directories for multi-php compose as they do not contain tools
- Updated vhost-gen templates in `cfg/vhost-gen` (replace your project templates with new ones)
## Release v3.0.0-beta-0.1 (2022-12-24) 🎅🎄🎁 ## 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: 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:

View File

@ -34,10 +34,23 @@
# __ERROR_LOG__ # __ERROR_LOG__
# #
###
### Notes about Apache
###
#
# 1. Each same directive is checked in order of definition (last one wins)
# 2. Directives are ordered: Directory, DirectoryMatch, Files, and finally Location (last one wins)
# * Last match always takes precedence
#
# Exception: Directories, where shortest path is matched first
# Exception: ProxyPass and Alias first match and then stops
### ###
### Basic vHost skeleton ### Basic vHost skeleton
### ###
### Note: Reverse Proxy section must be last for Apache 2.2
###
vhost: | vhost: |
<VirtualHost __DEFAULT_VHOST__:__PORT__> <VirtualHost __DEFAULT_VHOST__:__PORT__>
ServerName __VHOST_NAME__ ServerName __VHOST_NAME__
@ -45,11 +58,17 @@ vhost: |
CustomLog "__ACCESS_LOG__" combined CustomLog "__ACCESS_LOG__" combined
ErrorLog "__ERROR_LOG__" ErrorLog "__ERROR_LOG__"
# Reverse Proxy definition (Ensure to adjust the port, currently '8000') # ProxyRequests: Disable "Forward Proxy"
ProxyRequests On # ProxyPreserveHost: Pass "Host" header to remote
# ProxyVia: Add "Via" header
ProxyRequests Off
ProxyPreserveHost On ProxyPreserveHost On
ProxyPass / http://php:8000/ ProxyVia On
ProxyPassReverse / http://php:8000/ <Location />
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
ProxyPass http://php:8000/ retry=0
ProxyPassReverse http://php:8000/
</Location>
__REDIRECT__ __REDIRECT__
__SSL__ __SSL__
@ -92,6 +111,7 @@ features:
# Alias Definition # Alias Definition
Alias "__ALIAS__" "__PATH____ALIAS__" Alias "__ALIAS__" "__PATH____ALIAS__"
<Location "__ALIAS__"> <Location "__ALIAS__">
ProxyPass !
__XDOMAIN_REQ__ __XDOMAIN_REQ__
</Location> </Location>
<Directory "__PATH____ALIAS__"> <Directory "__PATH____ALIAS__">
@ -101,10 +121,10 @@ features:
deny: | deny: |
# Deny Definition # Deny Definition
<FilesMatch "__REGEX__"> <LocationMatch "__REGEX__">
Order allow,deny Order allow,deny
Deny from all Deny from all
</FilesMatch> </LocationMatch>
server_status: | server_status: |
# Status Page # Status Page

View File

@ -40,10 +40,23 @@
# __PHP_PORT__ # __PHP_PORT__
# #
###
### Notes about Apache
###
#
# 1. Each same directive is checked in order of definition (last one wins)
# 2. Directives are ordered: Directory, DirectoryMatch, Files, and finally Location (last one wins)
# * Last match always takes precedence
#
# Exception: Directories, where shortest path is matched first
# Exception: ProxyPass and Alias first match and then stops
### ###
### Basic vHost skeleton ### Basic vHost skeleton
### ###
### Note: Reverse Proxy section must be last for Apache 2.2
###
vhost: | vhost: |
<VirtualHost __DEFAULT_VHOST__:__PORT__> <VirtualHost __DEFAULT_VHOST__:__PORT__>
ServerName __VHOST_NAME__ ServerName __VHOST_NAME__
@ -54,13 +67,13 @@ vhost: |
__REDIRECT__ __REDIRECT__
__SSL__ __SSL__
__VHOST_DOCROOT__ __VHOST_DOCROOT__
__VHOST_RPROXY__
__PHP_FPM__ __PHP_FPM__
__ALIASES__ __ALIASES__
__DENIES__ __DENIES__
__SERVER_STATUS__ __SERVER_STATUS__
# Custom directives # Custom directives
__CUSTOM__ __CUSTOM__
__VHOST_RPROXY__
</VirtualHost> </VirtualHost>
### ###
@ -84,13 +97,38 @@ vhost_type:
Allow from all Allow from all
</Directory> </Directory>
# Reverse Proxy (-r) # Reverse Proxy (-r http(s)://ADDR:PORT)
rproxy: | rproxy: |
# Define the vhost to reverse proxy # ProxyRequests: Disable "Forward Proxy"
ProxyRequests On # ProxyPreserveHost: Pass "Host" header to remote
# ProxyVia: Add "Via" header
ProxyRequests Off
ProxyPreserveHost On ProxyPreserveHost On
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__ ProxyVia On
ProxyPassReverse __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__ <Location __LOCATION__>
# Reverse Proxy
ProxyPass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
ProxyPassReverse __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
</Location>
# Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
rproxy_ws: |
# ProxyRequests: Disable "Forward Proxy"
# ProxyPreserveHost: Pass "Host" header to remote
# ProxyVia: Add "Via" header
ProxyRequests Off
ProxyPreserveHost On
ProxyVia On
<Location __LOCATION__>
# Websocket Rewrite Settings
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule ^/?(.*)$ __WS_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/$1 [P,L]
# Reverse Proxy
ProxyPass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
ProxyPassReverse __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
</Location>
### ###
@ -120,6 +158,7 @@ features:
# Alias Definition # Alias Definition
Alias "__ALIAS__" "__PATH____ALIAS__" Alias "__ALIAS__" "__PATH____ALIAS__"
<Location "__ALIAS__"> <Location "__ALIAS__">
ProxyPass !
__XDOMAIN_REQ__ __XDOMAIN_REQ__
</Location> </Location>
<Directory "__PATH____ALIAS__"> <Directory "__PATH____ALIAS__">
@ -129,10 +168,10 @@ features:
deny: | deny: |
# Deny Definition # Deny Definition
<FilesMatch "__REGEX__"> <LocationMatch "__REGEX__">
Order allow,deny Order allow,deny
Deny from all Deny from all
</FilesMatch> </LocationMatch>
server_status: | server_status: |
# Status Page # Status Page

View File

@ -34,6 +34,17 @@
# __ERROR_LOG__ # __ERROR_LOG__
# #
###
### Notes about Apache
###
#
# 1. Each same directive is checked in order of definition (last one wins)
# 2. Directives are ordered: Directory, DirectoryMatch, Files, and finally Location (last one wins)
# * Last match always takes precedence
#
# Exception: Directories, where shortest path is matched first
# Exception: ProxyPass and Alias first match and then stops
### ###
### Basic vHost skeleton ### Basic vHost skeleton
@ -46,11 +57,19 @@ vhost: |
CustomLog "__ACCESS_LOG__" combined CustomLog "__ACCESS_LOG__" combined
ErrorLog "__ERROR_LOG__" ErrorLog "__ERROR_LOG__"
# Reverse Proxy definition (Ensure to adjust the port, currently '8000') # ProxyRequests: Disable "Forward Proxy"
ProxyRequests On # ProxyPreserveHost: Pass "Host" header to remote
# ProxyAddHeaders: Add "X-Forward-*" headers
# ProxyVia: Add "Via" header
ProxyRequests Off
ProxyPreserveHost On ProxyPreserveHost On
ProxyPass / http://php:8000/ ProxyAddHeaders On
ProxyPassReverse / http://php:8000/ ProxyVia On
<Location />
# Reverse Proxy definition (Ensure to adjust the port, currently '8000')
ProxyPass http://php:8000/ retry=0
ProxyPassReverse http://php:8000/
</Location>
__REDIRECT__ __REDIRECT__
__SSL__ __SSL__
@ -93,6 +112,7 @@ features:
# Alias Definition # Alias Definition
Alias "__ALIAS__" "__PATH____ALIAS__" Alias "__ALIAS__" "__PATH____ALIAS__"
<Location "__ALIAS__"> <Location "__ALIAS__">
ProxyPass !
__XDOMAIN_REQ__ __XDOMAIN_REQ__
</Location> </Location>
<Directory "__PATH____ALIAS__"> <Directory "__PATH____ALIAS__">
@ -103,10 +123,10 @@ features:
deny: | deny: |
# Deny Definition # Deny Definition
<FilesMatch "__REGEX__"> <LocationMatch "__REGEX__">
Order allow,deny Order allow,deny
Deny from all Deny from all
</FilesMatch> </LocationMatch>
server_status: | server_status: |
# Status Page # Status Page

View File

@ -40,6 +40,17 @@
# __PHP_PORT__ # __PHP_PORT__
# #
###
### Notes about Apache
###
#
# 1. Each same directive is checked in order of definition (last one wins)
# 2. Directives are ordered: Directory, DirectoryMatch, Files, and finally Location (last one wins)
# * Last match always takes precedence
#
# Exception: Directories, where shortest path is matched first
# Exception: ProxyPass and Alias first match and then stops
### ###
### Basic vHost skeleton ### Basic vHost skeleton
@ -86,13 +97,42 @@ vhost_type:
Require all granted Require all granted
</Directory> </Directory>
# Reverse Proxy (-r) # Reverse Proxy (-r http(s)://ADDR:PORT)
rproxy: | rproxy: |
# Define the vhost to reverse proxy # ProxyRequests: Disable "Forward Proxy"
ProxyRequests On # ProxyPreserveHost: Pass "Host" header to remote
# ProxyAddHeaders: Add "X-Forward-*" headers
# ProxyVia: Add "Via" header
ProxyRequests Off
ProxyPreserveHost On ProxyPreserveHost On
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__ ProxyAddHeaders On
ProxyPassReverse __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT____LOCATION__ ProxyVia On
<Location __LOCATION__>
# Reverse Proxy
ProxyPass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
ProxyPassReverse __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
</Location>
# Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
rproxy_ws: |
# ProxyRequests: Disable "Forward Proxy"
# ProxyPreserveHost: Pass "Host" header to remote
# ProxyAddHeaders: Add "X-Forward-*" headers
# ProxyVia: Add "Via" header
ProxyRequests Off
ProxyPreserveHost On
ProxyAddHeaders On
ProxyVia On
<Location __LOCATION__>
# Websocket Rewrite Settings
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule ^/?(.*)$ __WS_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/$1 [P,L]
# Reverse Proxy
ProxyPass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/ retry=0
ProxyPassReverse __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__/
</Location>
### ###
@ -141,6 +181,7 @@ features:
# Alias Definition # Alias Definition
Alias "__ALIAS__" "__PATH____ALIAS__" Alias "__ALIAS__" "__PATH____ALIAS__"
<Location "__ALIAS__"> <Location "__ALIAS__">
ProxyPass !
__XDOMAIN_REQ__ __XDOMAIN_REQ__
</Location> </Location>
<Directory "__PATH____ALIAS__"> <Directory "__PATH____ALIAS__">
@ -151,10 +192,10 @@ features:
deny: | deny: |
# Deny Definition # Deny Definition
<FilesMatch "__REGEX__"> <LocationMatch "__REGEX__">
Order allow,deny Order allow,deny
Deny from all Deny from all
</FilesMatch> </LocationMatch>
server_status: | server_status: |
# Status Page # Status Page

View File

@ -48,8 +48,11 @@ vhost: |
# Reverse Proxy definition (Ensure to adjust the port, currently '8000') # Reverse Proxy definition (Ensure to adjust the port, currently '8000')
location / { location / {
proxy_set_header Host $host; # https://stackoverflow.com/a/72586833
proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Proxy connection
proxy_pass http://php:8000; proxy_pass http://php:8000;
} }

View File

@ -75,12 +75,31 @@ vhost_type:
root "__DOCUMENT_ROOT__"; root "__DOCUMENT_ROOT__";
index __INDEX__; index __INDEX__;
# Reverse Proxy (-r) # Reverse Proxy (-r http(s)://ADDR:PORT)
rproxy: | rproxy: |
# Define the vhost to reverse proxy # Define Reverse Proxy
location __LOCATION__ { location __LOCATION__ {
proxy_set_header Host $host; # https://stackoverflow.com/a/72586833
proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Proxy connection
proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
}
# Reverse Proxy with websocket support (-r ws(s)://ADDR:PORT)
rproxy_ws: |
# Define Reverse Proxy with Websock support
location __LOCATION__ {
# https://stackoverflow.com/a/72586833
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Websocket settings
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
# Proxy connection
proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__; proxy_pass __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__;
} }

View File

@ -34,7 +34,7 @@ services:
php54: php54:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:5.4-prod-0.147 image: devilbox/php-fpm:5.4-prod-0.148
hostname: php54 hostname: php54
networks: networks:
app_net: app_net:
@ -43,16 +43,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.4:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-5.4:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-5.4:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-5.4:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php55: php55:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:5.5-prod-0.147 image: devilbox/php-fpm:5.5-prod-0.148
hostname: php55 hostname: php55
networks: networks:
app_net: app_net:
@ -61,16 +61,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.5:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-5.5:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-5.5:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-5.5:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php56: php56:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:5.6-prod-0.147 image: devilbox/php-fpm:5.6-prod-0.148
hostname: php56 hostname: php56
networks: networks:
app_net: app_net:
@ -79,16 +79,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-5.6:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-5.6:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-5.6:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-5.6:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php70: php70:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:7.0-prod-0.147 image: devilbox/php-fpm:7.0-prod-0.148
hostname: php70 hostname: php70
networks: networks:
app_net: app_net:
@ -97,16 +97,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.0:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-7.0:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.0:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-7.0:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php71: php71:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:7.1-prod-0.147 image: devilbox/php-fpm:7.1-prod-0.148
hostname: php71 hostname: php71
networks: networks:
app_net: app_net:
@ -115,16 +115,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.1:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-7.1:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.1:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-7.1:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php72: php72:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:7.2-prod-0.147 image: devilbox/php-fpm:7.2-prod-0.148
hostname: php72 hostname: php72
networks: networks:
app_net: app_net:
@ -133,16 +133,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.2:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-7.2:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.2:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-7.2:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php73: php73:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:7.3-prod-0.147 image: devilbox/php-fpm:7.3-prod-0.148
hostname: php73 hostname: php73
networks: networks:
app_net: app_net:
@ -151,16 +151,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.3:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-7.3:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.3:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-7.3:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php74: php74:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:7.4-prod-0.147 image: devilbox/php-fpm:7.4-prod-0.148
hostname: php74 hostname: php74
networks: networks:
app_net: app_net:
@ -169,16 +169,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-7.4:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-7.4:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-7.4:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-7.4:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php80: php80:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:8.0-prod-0.147 image: devilbox/php-fpm:8.0-prod-0.148
hostname: php80 hostname: php80
networks: networks:
app_net: app_net:
@ -187,16 +187,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-8.0:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-8.0:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-8.0:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-8.0:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php81: php81:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:8.1-prod-0.147 image: devilbox/php-fpm:8.1-prod-0.148
hostname: php81 hostname: php81
networks: networks:
app_net: app_net:
@ -205,16 +205,16 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-8.1:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-8.1:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-8.1:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-8.1:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}
php82: php82:
<<: *default-php <<: *default-php
image: devilbox/php-fpm:8.2-prod-0.147 image: devilbox/php-fpm:8.2-prod-0.148
hostname: php82 hostname: php82
networks: networks:
app_net: app_net:
@ -223,9 +223,9 @@ services:
# Specific volumes # Specific volumes
- ${DEVILBOX_PATH}/cfg/php-ini-8.2:/etc/php-custom.d:ro${MOUNT_OPTIONS} - ${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-fpm-8.2:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/cfg/php-startup-8.2:/startup.1.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/cfg/php-startup-8.2:/startup.1.d:rw${MOUNT_OPTIONS}
# Generic volumes # Generic volumes
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS} - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS} - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
- ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS} # - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
- devilbox-mail:/var/mail:rw${MOUNT_OPTIONS} - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

View File

@ -99,7 +99,7 @@ services:
# PHP # PHP
# ------------------------------------------------------------ # ------------------------------------------------------------
php: php:
image: devilbox/php-fpm:${PHP_SERVER}-work-0.147 image: devilbox/php-fpm:${PHP_SERVER}-work-0.148
hostname: php hostname: php
## ##
@ -227,7 +227,7 @@ services:
# Web Server # Web Server
# ------------------------------------------------------------ # ------------------------------------------------------------
httpd: httpd:
image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-1.0-beta1 image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-1.0-beta2
hostname: httpd hostname: httpd
environment: environment: