Fixes #692 Add custom supervisor configs

This commit is contained in:
cytopia 2020-11-22 10:56:08 +01:00
parent c96f740c39
commit 8e7069f893
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
5 changed files with 142 additions and 1 deletions

View File

@ -0,0 +1,126 @@
<?php require '../config.php'; ?>
<?php loadClass('Helper')->authPage(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo loadClass('Html')->getHead(); ?>
</head>
<body>
<?php echo loadClass('Html')->getNavbar(); ?>
<div class="container">
<h1>PHP custom configs</h1>
<br/>
<br/>
<p>Shows your currently custom configuration files applied to the PHP-FPM container.</p>
<div class="row">
<div class="col-md-12">
<table class="table table-striped">
<thead class="thead-inverse">
<tr>
<th>Section</th>
<th>Host</th>
<th>Container</th>
<th>Files</th>
</tr>
</thead>
<tbody>
<tr>
<th>Supervisord</th>
<td>supervisor/</td>
<td>/etc/supervisor/custom.d/</td>
<td>
<?php
$files = glob('/etc/supervisor/custom.d/*.conf');
if ($files) {
foreach ($files as $file) {
echo '<code>'.basename($file). '</code><br/>';
}
} else {
echo 'No custom files';
}
?>
</td>
</tr>
<tr>
<th>Autostart (global)</th>
<td>autostart/</td>
<td>/startup.2.d/</td>
<td>
<?php
$files = glob('/startup.2.d/*.sh');
if ($files) {
foreach ($files as $file) {
echo '<code>'.basename($file). '</code><br/>';
}
} else {
echo 'No custom files';
}
?>
</td>
</tr>
<tr>
<th>Autostart (version)</th>
<td>cfg/php-startup-<?php echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;?>/</td>
<td>/startup.1.d/</td>
<td>
<?php
$files = glob('/startup.1.d/*.sh');
if ($files) {
foreach ($files as $file) {
echo '<code>'.basename($file). '</code><br/>';
}
} else {
echo 'No custom files';
}
?>
</td>
</tr>
<tr>
<th>PHP-FPM</th>
<td>cfg/php-fpm-<?php echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;?>/</td>
<td>/etc/php-fpm-custom.d/</td>
<td>
<?php
$files = glob('/etc/php-fpm-custom.d/*.conf');
if ($files) {
foreach ($files as $file) {
echo '<code>'.basename($file). '</code><br/>';
}
} else {
echo 'No custom files';
}
?>
</td>
</tr>
<tr>
<th>PHP</th>
<td>cfg/php-ini-<?php echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;?>/</td>
<td>/etc/php-custom.d/</td>
<td>
<?php
$files = glob('/etc/php-custom.d/*.ini');
if ($files) {
foreach ($files as $file) {
echo '<code>'.basename($file). '</code><br/>';
}
} else {
echo 'No custom files';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?>
</body>
</html>

View File

@ -23,6 +23,15 @@ class Html
'path' => '/mail.php'
)
),
array(
'name' => 'Configs',
'menu' => array(
array(
'name' => 'PHP',
'path' => '/config_php.php'
),
),
),
array(
'name' => 'Databases',
'menu' => array(

3
.gitignore vendored
View File

@ -137,6 +137,9 @@
/mod/php-fpm-8.0/*.so
/mod/php-fpm-8.1/*.so
# Ignore supervisord configs
/supervisor/*.conf
# Ignore custom bash and other confi files
/bash/*
!/bash/bashrc.sh-example

View File

@ -95,7 +95,7 @@ services:
# PHP
# ------------------------------------------------------------
php:
image: devilbox/php-fpm:${PHP_SERVER}-work-0.116
image: devilbox/php-fpm:${PHP_SERVER}-work-0.117
hostname: php
##
@ -204,6 +204,9 @@ services:
# Mount devilbox user-defined bash config
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
# Mount devilbox user-defined supervisord config
- ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}
# Certificate Authority public key
- ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}

0
supervisor/.keepme Normal file
View File