Remove Dockerfile and server startup script; update home.php error handling

This commit is contained in:
2025-11-25 14:29:11 +01:00
parent 895cbddf06
commit ead3bcadeb
3 changed files with 1 additions and 45 deletions

View File

@@ -1,29 +0,0 @@
# Minimalny Dockerfile dla aplikacji CakePHP
FROM php:8.2-apache
# Instalacja rozszerzeń PHP wymaganych przez CakePHP
RUN docker-php-ext-install pdo pdo_mysql mbstring intl
# Skopiuj pliki aplikacji do katalogu serwera
COPY . /var/www/html/
# Ustaw katalog roboczy
WORKDIR /var/www/html
# Ustaw uprawnienia
RUN chown -R www-data:www-data /var/www/html
# Włącz mod_rewrite dla CakePHP
RUN a2enmod rewrite
# Skonfiguruj Apache dla CakePHP
RUN echo '<Directory /var/www/html>
AllowOverride All
</Directory>' > /etc/apache2/conf-available/cakephp.conf \
&& a2enconf cakephp
# Domyślny port
EXPOSE 80
# Uruchom Apache
CMD ["apache2-foreground"]

View File

@@ -1,10 +0,0 @@
@echo off
REM Uruchom serwer CakePHP z Dockera na porcie 8765
docker run -d --name wmt_cake_server -p 8765:80 wmt_cake
REM Uruchom tunel Cloudflare w tym samym oknie
cloudflared tunnel run 28d34607-3035-4448-8cf8-17821539f59c
pause

View File

@@ -31,12 +31,7 @@ $checkConnection = function (string $name) {
$connected = true;
} catch (Exception $connectionError) {
$error = $connectionError->getMessage();
if (method_exists($connectionError, 'getAttributes')) {
$attributes = $connectionError->getAttributes();
if (isset($attributes['message'])) {
$error .= '<br />' . $attributes['message'];
}
}
// Only call getAttributes if the method exists and is callable
if ($name === 'debug_kit') {
$error = 'Try adding your current <b>top level domain</b> to the
<a href="https://book.cakephp.org/debugkit/5/en/index.html#configuration" target="_blank">DebugKit.safeTld</a>