Initial commit

This commit is contained in:
Brus 2026-01-11 17:25:10 +01:00
commit c3f8908cb5
8 changed files with 660 additions and 0 deletions

34
Dockerfile Normal file
View file

@ -0,0 +1,34 @@
FROM php:8.2-apache
# Install required system packages
RUN apt-get update && apt-get install -y \
cron \
sqlite3 \
libsqlite3-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install pdo pdo_sqlite
# Enable Apache rewrite (optional)
RUN a2enmod rewrite
# Copy application
COPY index.php /var/www/html/index.php
# COPY history.php /var/www/html/history.php
COPY check_ssl.php /var/www/check_ssl.php
COPY domains.txt /var/www/domains.txt
# Create data directory
RUN mkdir -p /var/www/data \
&& chown -R www-data:www-data /var/www
# Cron job (every 6 hours)
RUN echo "0 */6 * * * php /var/www/check_ssl.php >> /var/log/cron.log 2>&1" \
> /etc/cron.d/ssl \
&& chmod 0644 /etc/cron.d/ssl \
&& crontab /etc/cron.d/ssl
# Start cron + Apache
CMD cron && apache2-foreground