diff --git a/CHANGELOG.md b/CHANGELOG.md index a617d0b..052bb96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Changes 10/7/2025 (no new version) + +feat(start.sh): stream Apache logs to console + startup polish + +- Tail /var/www/metadata/log/{access,error}.log to container stdout (STREAM_LOGS=true by default) +- Ensure log/session dirs exist with sane perms; no port/vhost changes +- Keep Apache in foreground; clearer startup message + ## Changes 10/6/2025 v1.3.15 feat/perf: large-file handling, faster file list, richer CodeMirror modes (fixes #48) diff --git a/start.sh b/start.sh index 37c65a1..c268a42 100644 --- a/start.sh +++ b/start.sh @@ -57,6 +57,11 @@ mkdir -p /var/www/metadata/log chown www-data:www-data /var/www/metadata/log chmod 775 /var/www/metadata/log +: > /var/www/metadata/log/access.log +: > /var/www/metadata/log/error.log +chown www-data:www-data /var/www/metadata/log/access.log /var/www/metadata/log/error.log +chmod 664 /var/www/metadata/log/access.log /var/www/metadata/log/error.log + mkdir -p /var/www/sessions chown www-data:www-data /var/www/sessions chmod 700 /var/www/sessions @@ -153,5 +158,13 @@ if [ "${SCAN_ON_START:-}" = "true" ]; then fi fi -echo "🔥 Starting Apache..." +# 9.6) Stream Apache logs to the container console (optional toggle) +if [ "${STREAM_LOGS:-true}" = "true" ]; then + echo "[startup] Streaming Apache logs to container console..." + # access.log -> STDOUT, error.log -> STDERR + tail -n0 -F /var/www/metadata/log/access.log >> /proc/1/fd/1 & + tail -n0 -F /var/www/metadata/log/error.log >> /proc/1/fd/2 & +fi + +echo "✅ Apache starting (foreground). Check container logs for access/error output…" exec apachectl -D FOREGROUND