diff --git a/Dockerfile b/Dockerfile index 5ff8fb62ffc171097d0d3eafa3987256454a2767..21d064f323b2f5db863497d5467a853abea43d7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,35 +14,39 @@ COPY --from=buildJS /build /build RUN cd /build/public/API && composer install # Prepare Webserver -FROM php:8-apache-buster +FROM alpine:latest # |-------------------------------------------------------------------------- -# | install php extensions +# | install dependencies # |-------------------------------------------------------------------------- -RUN docker-php-ext-install mysqli - -# |-------------------------------------------------------------------------- -# | enable production php ini -# |-------------------------------------------------------------------------- -RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" +RUN apk update && \ + apk upgrade && \ + apk add apache2 php8-apache2 php8-mysqli php8-mbstring curl && \ + rm /var/www/localhost/htdocs/ -R # |-------------------------------------------------------------------------- # | copy website from node build # |-------------------------------------------------------------------------- -COPY --from=composer /build/public /var/www/html +COPY --from=composer /build/public /var/www/localhost/htdocs/ # |-------------------------------------------------------------------------- # | enable apache modules # |-------------------------------------------------------------------------- -RUN a2enmod headers rewrite +RUN sed -i '/LoadModule rewrite_module/s/^#//g' /etc/apache2/httpd.conf && \ + sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /etc/apache2/httpd.conf # |-------------------------------------------------------------------------- -# | enable metrics +# | enable healthcheck # |-------------------------------------------------------------------------- -RUN apt update && apt install curl HEALTHCHECK CMD curl --fail http://localhost || exit 1 # |-------------------------------------------------------------------------- # | expose http port # |-------------------------------------------------------------------------- EXPOSE 80 + +# |-------------------------------------------------------------------------- +# | set entrypoint +# |-------------------------------------------------------------------------- +COPY httpd-foreground /usr/local/bin/ +CMD ["httpd-foreground"] \ No newline at end of file diff --git a/httpd-foreground b/httpd-foreground new file mode 100755 index 0000000000000000000000000000000000000000..e896168ca1783bc50327bc4a7e7806ba8aa6d482 --- /dev/null +++ b/httpd-foreground @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /usr/local/apache2/logs/httpd.pid + +exec httpd -DFOREGROUND "$@" diff --git a/public/Anleitungen/nextcloud.html b/public/Anleitungen/nextcloud.html index 742ce89809bf42dfccc2a9b06169c279e9d674ff..5715ac0180dc03da0f1470cc6dddcbd7c8f7c18d 100644 --- a/public/Anleitungen/nextcloud.html +++ b/public/Anleitungen/nextcloud.html @@ -83,5 +83,5 @@ chown apache /var/www/localhost/htdocs/ -R</code> </div> <jl-footer></jl-footer> - <script async defer src='https://www.hCaptcha.com/1/api.js'></script> + <script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Anleitungen/snowboy.html b/public/Anleitungen/snowboy.html index 7b55ba574cc87fb1b219530a8b7df2bd56c950c0..e0fb8aa94082905f29ad280bfb7a830b116d811a 100644 --- a/public/Anleitungen/snowboy.html +++ b/public/Anleitungen/snowboy.html @@ -65,5 +65,5 @@ make</code></pre> </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/URLkuerzer1.html b/public/Projekte/URLkuerzer1.html index f9032edb3598937fa38df7978b8fa540f2e780ec..e32153aa731fecb5392a26798ea97eef4379f50e 100644 --- a/public/Projekte/URLkuerzer1.html +++ b/public/Projekte/URLkuerzer1.html @@ -41,5 +41,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/URLkuerzer2.html b/public/Projekte/URLkuerzer2.html index 06e6ae9d4e7085aaa314658496c48f43c5715c04..1d71893ea71fadaaf16e91e1599b0e8535fce16d 100644 --- a/public/Projekte/URLkuerzer2.html +++ b/public/Projekte/URLkuerzer2.html @@ -48,5 +48,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/blitzortung.html b/public/Projekte/blitzortung.html index c8734001dfcfeffadc534f769c4bdb0d3effca24..e83ae69cbb517643aa39df3fcc928a8323a0afd9 100644 --- a/public/Projekte/blitzortung.html +++ b/public/Projekte/blitzortung.html @@ -27,7 +27,7 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> </html> \ No newline at end of file diff --git a/public/Projekte/gclogLink.html b/public/Projekte/gclogLink.html index bbe12775c7126ee477740ef725a065767e9235a0..ae715dbebaee663af531875d58af7046d59d94e8 100644 --- a/public/Projekte/gclogLink.html +++ b/public/Projekte/gclogLink.html @@ -24,5 +24,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/insecam.html b/public/Projekte/insecam.html index c34703ae061c418ed4df6e90248fc54498755d3c..d044fa1196bc3ec82ecb50bef2172b7454c3f887 100644 --- a/public/Projekte/insecam.html +++ b/public/Projekte/insecam.html @@ -45,5 +45,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/ledtisch1.html b/public/Projekte/ledtisch1.html index d89b05b4d751ca2b955acf0cdc3516c5e3e13fba..55761eb6a34f5e7dd1579f8ac032022c7d83786f 100644 --- a/public/Projekte/ledtisch1.html +++ b/public/Projekte/ledtisch1.html @@ -141,5 +141,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/ledtisch2.html b/public/Projekte/ledtisch2.html index bbbf6079c00bc851d34f385667df2e57de6583cd..12b62b3343b50543529add16a4a4a6b9d87e3cba 100644 --- a/public/Projekte/ledtisch2.html +++ b/public/Projekte/ledtisch2.html @@ -81,5 +81,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> diff --git a/public/Projekte/mqttpush.html b/public/Projekte/mqttpush.html index dfdb59fc576f109e06bba83cc3a79276c38361ba..f10c576aee27e08507fc688ad13d8489fde515f6 100644 --- a/public/Projekte/mqttpush.html +++ b/public/Projekte/mqttpush.html @@ -26,5 +26,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/privateNote.html b/public/Projekte/privateNote.html index d150b8b1a94d5c82328aaa0b936ffcb7c47eaf7f..6f3327ef08dd6abd1316322f6e18ea9763b750a5 100644 --- a/public/Projekte/privateNote.html +++ b/public/Projekte/privateNote.html @@ -39,7 +39,7 @@ </div> <jl-footer></jl-footer> - <script src='https://www.hCaptcha.com/1/api.js' async defer></script> + <script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> diff --git a/public/Projekte/proxdroid.html b/public/Projekte/proxdroid.html index c92da3d80c096232dcb4b7a5b15b1daa0484267b..ba65582b69475e549441986d97327f5c6e6d4722 100644 --- a/public/Projekte/proxdroid.html +++ b/public/Projekte/proxdroid.html @@ -31,5 +31,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/regensensor.html b/public/Projekte/regensensor.html index a8fc02b233a3d63e9c7b9bea6783cd6b201f37b2..9d8613c98c96e2fe1db94fd45316462106dc18d5 100644 --- a/public/Projekte/regensensor.html +++ b/public/Projekte/regensensor.html @@ -55,5 +55,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/smartmirror.html b/public/Projekte/smartmirror.html index 673fae98a4df7316dd7815eede31c5090c367568..8eff6795ff9908f8300c89ffb23f4d3aac23774b 100644 --- a/public/Projekte/smartmirror.html +++ b/public/Projekte/smartmirror.html @@ -40,5 +40,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/websitecloner.html b/public/Projekte/websitecloner.html index 4ee414f24bc44a5943392938e26052718081bc67..efe9b9e1aa1924600fe42c97b1fb6f09c8eb36d3 100644 --- a/public/Projekte/websitecloner.html +++ b/public/Projekte/websitecloner.html @@ -19,5 +19,5 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/Projekte/youtubedownloader.html b/public/Projekte/youtubedownloader.html index 2c27a80f21e3cdc533fdf884481d72e91a3d15ea..e00e6fa6e78c0e961a1653fef0e63d70739cc8f0 100644 --- a/public/Projekte/youtubedownloader.html +++ b/public/Projekte/youtubedownloader.html @@ -25,5 +25,5 @@ </div> <jl-footer></jl-footer> -<script async defer src='https://www.hCaptcha.com/1/api.js'></script> +<script async defer src='https://hCaptcha.com/1/api.js'></script> <script src="/js/script.js"></script> \ No newline at end of file diff --git a/public/impressum.html b/public/impressum.html index 8851590b4e6df9dfc89e957c2476f164e6f78cea..265bb21c426aa02b91fceb487a6a707c18fb04f1 100644 --- a/public/impressum.html +++ b/public/impressum.html @@ -9,7 +9,7 @@ <body> <jl-header data-title="Impressum"></jl-header> <div id="content"> - <script async defer src='https://www.hCaptcha.com/1/api.js'></script> + <script async defer src='https://hCaptcha.com/1/api.js'></script> <h2>Impressum</h2> <p> Jonas Leder<br> diff --git a/public/systeme/backupServer.html b/public/systeme/backupServer.html index fb1107cef187189e0ec8fa3b2340caa2e4ab9130..bfa8826a7283eff576412e45c5b6e1a4a06c5b00 100644 --- a/public/systeme/backupServer.html +++ b/public/systeme/backupServer.html @@ -35,7 +35,7 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> </html> diff --git a/public/systeme/gameServer.html b/public/systeme/gameServer.html index 7bd72feb79d90fe0c20e3aa8fe5f97400cb5342d..d03e146b6455e7c1e1f6f539e9f41a2e4959efc9 100644 --- a/public/systeme/gameServer.html +++ b/public/systeme/gameServer.html @@ -43,7 +43,7 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> </html> \ No newline at end of file diff --git a/public/systeme/hpServer.html b/public/systeme/hpServer.html index d81ae9df61305981b12af7a68d902d52202fb4f3..bf9f3faadd0c3937c51f375c18b986568b319317 100644 --- a/public/systeme/hpServer.html +++ b/public/systeme/hpServer.html @@ -40,7 +40,7 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> </html> \ No newline at end of file diff --git a/public/systeme/nas.html b/public/systeme/nas.html index f0227fc0dc72d4c7aedb4e4126b318353d6efe77..a6b499d49c534ae7426ba82014749b05c26f6ca0 100644 --- a/public/systeme/nas.html +++ b/public/systeme/nas.html @@ -35,7 +35,7 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> </html> \ No newline at end of file diff --git a/public/systeme/pc.html b/public/systeme/pc.html index b7515e1b84c6ec78b2f9ad36a06e183b31c10c73..557167a927db119f57f85f39a0837321c1c52711 100644 --- a/public/systeme/pc.html +++ b/public/systeme/pc.html @@ -47,7 +47,7 @@ </div> <jl-footer></jl-footer> -<script src='https://www.hCaptcha.com/1/api.js' async defer></script> +<script src='https://hCaptcha.com/1/api.js' async defer></script> <script src="/js/script.js"></script> </body> </html>