improved docker setup

This commit is contained in:
2025-09-22 09:36:40 +02:00
parent 3d4bde9d49
commit 56fa2e9357
4 changed files with 21 additions and 18 deletions

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# Variables
LOG_DIR="/var/log/apache2"
ERROR_LOG="${LOG_DIR}/error.log"
ACCESS_LOG="${LOG_DIR}/access.log"
LINES_TO_KEEP=50
# Truncate logs to keep only the last 50 lines
tail -n $LINES_TO_KEEP $ERROR_LOG > ${ERROR_LOG}.tmp && mv ${ERROR_LOG}.tmp $ERROR_LOG
tail -n $LINES_TO_KEEP $ACCESS_LOG > ${ACCESS_LOG}.tmp && mv ${ACCESS_LOG}.tmp $ACCESS_LOG

6
docker/php/custom.ini Normal file
View File

@@ -0,0 +1,6 @@
max_execution_time = 600
memory_limit = 4G
display_errors = On
display_startup_errors = On
log_errors = On
error_log = /var/log/apache2/php_errors.log

View File

@@ -1,5 +0,0 @@
#!/bin/bash
trap "echo 'Stopping Apache...'; apachectl stop; exit 0" SIGTERM
apachectl -D FOREGROUND &
# Wait for Apache and all child processes to exit
wait $!