All checks were successful
CI / PHP Lint (pull_request) Successful in 41s
CI / PHP Lint-1 (pull_request) Successful in 53s
CI / Unit Tests & Static Analysis (pull_request) Successful in 38s
CI / PHP Lint (push) Successful in 36s
CI / PHP Lint-1 (push) Successful in 42s
CI / Unit Tests & Static Analysis (push) Successful in 41s
Das Projekt nennt sich in composer.json und Readme MIT, der Lizenztext fehlte aber komplett - ohne ihn ist die Angabe wertlos. Dazu kamen die Bibliotheken unter assets/vendor/, die ihre Hinweise mitführen müssen (MIT und OFL verlangen den Copyright-Vermerk in jeder Kopie, CC BY 4.0 die Namensnennung). - LICENSE (MIT) im Wurzelverzeichnis - THIRD-PARTY-NOTICES.md mit Version, Copyright und Lizenz je Komponente - Vollständige Lizenztexte als LICENSE.txt bei Inter, Font Awesome, Chart.js und qrcodejs (TinyMCE brachte seine schon mit) - Readme: Abschnitt "Lizenz"; assets/vendor/README.md verweist auf die Lizenzdateien und erinnert daran, sie beim Update mit zu erneuern - Dockerfile mit OCI-Labels (u.a. image.licenses=MIT), .dockerignore nimmt die Hinweisdateien trotz *.md wieder auf - OpenAPI-Spezifikation nennt Lizenz und Kontakt TinyMCE 6.8.3 stand an drei Stellen als GPL-Variante, ist seit Version 6 aber MIT (siehe mitgelieferte license.txt). Korrigiert in der Vendor-Übersicht, im Sprachtext zum Editor und im Kommentar in admin/settings.php. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
46 lines
1.7 KiB
Docker
46 lines
1.7 KiB
Docker
# UniFi Voucher Management System – Container-Image
|
||
FROM php:8.3-apache
|
||
|
||
LABEL org.opencontainers.image.title="UniFi Voucher Management System" \
|
||
org.opencontainers.image.description="Webbasiertes WLAN-Voucher-Management für UniFi OS" \
|
||
org.opencontainers.image.source="https://git.loheide.cloud/friloo/Unifi-Voucher-Tool" \
|
||
org.opencontainers.image.licenses="MIT" \
|
||
org.opencontainers.image.vendor="Loheide.eu" \
|
||
org.opencontainers.image.authors="Friederich Loheide <https://loheide.eu>"
|
||
|
||
# System-Tools (curl für Healthcheck) + PHP-Extensions
|
||
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
||
&& rm -rf /var/lib/apt/lists/* \
|
||
&& docker-php-ext-install pdo pdo_mysql \
|
||
&& a2enmod rewrite headers
|
||
|
||
# Empfohlene PHP-Einstellungen
|
||
RUN { \
|
||
echo 'display_errors=0'; \
|
||
echo 'log_errors=1'; \
|
||
echo 'expose_php=0'; \
|
||
echo 'upload_max_filesize=8M'; \
|
||
echo 'post_max_size=8M'; \
|
||
} > /usr/local/etc/php/conf.d/zz-voucher.ini
|
||
|
||
# .htaccess auswerten (Sicherheits-Header, Schutz des uploads-Ordners)
|
||
RUN sed -ri 's!<Directory /var/www/>!<Directory /var/www/>\n\tAllowOverride All!g' /etc/apache2/apache2.conf
|
||
|
||
WORKDIR /var/www/html
|
||
COPY . /var/www/html
|
||
|
||
# Laufzeit-Verzeichnisse beschreibbar machen
|
||
RUN mkdir -p /var/www/html/updater/storage /var/www/html/uploads \
|
||
&& chown -R www-data:www-data /var/www/html
|
||
|
||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||
|
||
EXPOSE 80
|
||
|
||
# Apache-Worker laufen als www-data (Privilege-Drop durch den Master).
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||
CMD curl -fsS http://localhost/health.php || exit 1
|
||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||
CMD ["apache2-foreground"]
|