Compare commits
No commits in common. "8af61f97b06b79ea02b136dde4e2f16119f156f9" and "f06c804c249c397f63bed9e6b88dca91cf0a8606" have entirely different histories.
8af61f97b0
...
f06c804c24
@ -13,9 +13,6 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
# Activeer mod_rewrite
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Installeer git
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y git
|
||||
|
||||
# Installeer de Process Control extension
|
||||
RUN curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s pcntl zip
|
||||
|
||||
|
12
index.php
12
index.php
@ -6,18 +6,6 @@ if($_SERVER["REQUEST_URI"] == '/metrics') {
|
||||
$phpbin = getenv('PHP_BINARY');
|
||||
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . 'script.php');
|
||||
echo $output;
|
||||
} elseif ($_SERVER["REQUEST_URI"] == '/config') {
|
||||
header('Content-Type: application/json');
|
||||
require_once getenv('CONFIG_FILE');
|
||||
echo json_encode($config);
|
||||
} elseif ($_SERVER["REQUEST_URI"] == '/version') {
|
||||
header('Content-Type: application/json');
|
||||
$git = [
|
||||
'lastCommit' => trim(shell_exec('git rev-parse HEAD')),
|
||||
'lastCommitTimestamp' => trim(shell_exec('git log -1 --format=%cd')),
|
||||
'branch' => trim(shell_exec('git rev-parse --abbrev-ref HEAD')),
|
||||
];
|
||||
echo json_encode($git);
|
||||
} else {
|
||||
require_once('vendor/autoload.php');
|
||||
http_response_code(404);
|
||||
|
@ -8,7 +8,5 @@
|
||||
<body>
|
||||
<h1>404 Uri {{ path }} not found</h1>
|
||||
<p><a href="/metrics">/metrics</a></p>
|
||||
<p><a href="/config">/config</a></p>
|
||||
<p><a href="/version">/version</a></p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user