Add context menu for missing buildings and update fault handling

This commit is contained in:
2025-11-04 09:45:26 +01:00
parent 5c94fe3205
commit 98be5e1614
4 changed files with 362 additions and 76 deletions

View File

@@ -1,50 +1,42 @@
# Use Debian Bookworm as base image
FROM debian:bookworm
# Use Debian 13 “Trixie” as base image
FROM debian:trixie
# Install wkhtmltopdf
RUN apt update
RUN apt install wget libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.stretch_amd64.deb
RUN dpkg --force-all -i wkhtmltox_0.12.6-1.stretch_amd64.deb
RUN wget https://www.mytaxexpress.com/download/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
RUN wget https://archive.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8b-1_amd64.deb
RUN dpkg -i libjpeg8_8b-1_amd64.deb
# Install apache2 and PHP and PHP modules
# Install ALL native packages from Debian 13 first
RUN apt update && \
apt install -y poppler-utils apache2 curl cron unzip php8.2 php8.2-imap php8.2-curl php8.2-cli php8.2-mysqli php8.2-gd php8.2-zip php8.2-dom php8.2-mbstring && \
apt install -y \
# wkhtmltopdf prerequisites
wget libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig \
\
# Apache + PHP + Utils
poppler-utils apache2 curl cron unzip \
php8.4 php8.4-curl php8.4-cli php8.4-mysqli php8.4-gd php8.4-zip php8.4-dom php8.4-mbstring && \
\
# Install Composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
apt clean && \
rm -rf /var/lib/apt/lists/*
\
# Clean up apt cache
apt clean && rm -rf /var/lib/apt/lists/*
# Enable PHP in Apache2
RUN a2enmod php8.2
RUN a2enmod rewrite
# --- Now, install the old/insecure libraries for wkhtmltopdf ---
# Composer install
RUN wget https://www.mytaxexpress.com/download/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb && \
dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
RUN wget https://archive.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8b-1_amd64.deb && \
dpkg -i libjpeg8_8b-1_amd64.deb
# Finally, install wkhtmltopdf itself, forcing it over the broken dependencies
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.stretch_amd64.deb && \
dpkg --force-all -i wkhtmltox_0.12.6-1.stretch_amd64.deb
# Enable PHP in Apache2 and enable rewrite
RUN a2enmod php8.4 \
&& a2enmod rewrite
# Set working directory and copy composer.json, then run composer install
WORKDIR /var/www/html
COPY ../../composer.json ./
RUN composer install --no-interaction
COPY ./docker/php/clean_logs.sh /root/clean_logs.sh
RUN chmod +x /root/clean_logs.sh
# Add cron job for log cleanup
RUN echo "* * * * * /root/clean_old_logs.sh" > /etc/cron.d/clean_old_logs && \
chmod 0644 /etc/cron.d/clean_old_logs && \
crontab /etc/cron.d/clean_old_logs
# Start Apache in the foreground
CMD ["apachectl", "-D", "FOREGROUND"]
# Install XDEBUG
# apt install -y php8.2-xdebug
#
# cat <<'EOF' > /etc/php/8.2/apache2/conf.d/99-xdebug-custom.ini
#[xdebug]
#xdebug.mode=profile
#xdebug.start_with_request=trigger
#xdebug.output_dir="/tmp/xdebug_profiles"
#EOF
# Expose port 80 and start Apache in foreground
CMD ["apachectl", "-D", "FOREGROUND"]