From 209e4f3ac101cebf71610107b816a01ad83fe6b8 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Thu, 23 Jan 2025 22:12:09 +0100 Subject: [PATCH 1/3] Delete rootfs/docker-entrypoint-init.d/01-uname.sh --- rootfs/docker-entrypoint-init.d/01-uname.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 rootfs/docker-entrypoint-init.d/01-uname.sh diff --git a/rootfs/docker-entrypoint-init.d/01-uname.sh b/rootfs/docker-entrypoint-init.d/01-uname.sh deleted file mode 100755 index a3731a4..0000000 --- a/rootfs/docker-entrypoint-init.d/01-uname.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# Test file to check init scripts -uname -a \ No newline at end of file From 1decdf0f0340c87678cd28ba47e9f9ef50da6264 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Thu, 23 Jan 2025 22:19:51 +0100 Subject: [PATCH 2/3] Add rootfs/docker-entrypoint-init.d/99-startup-commands.sh --- .../99-startup-commands.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 rootfs/docker-entrypoint-init.d/99-startup-commands.sh diff --git a/rootfs/docker-entrypoint-init.d/99-startup-commands.sh b/rootfs/docker-entrypoint-init.d/99-startup-commands.sh new file mode 100644 index 0000000..241596b --- /dev/null +++ b/rootfs/docker-entrypoint-init.d/99-startup-commands.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Zähler für die Befehle +i=0 + +# Schleife, um die Befehle aus den Umgebungsvariablen zu lesen +while :; do + # Dynamische Umgebungsvariable aufbauen + cmd_var="STARTUP_COMMAND_$i" + + # Überprüfen, ob die Umgebungsvariable gesetzt ist + if [ -n "${!cmd_var}" ]; then + echo "Führe Befehl $i aus: ${!cmd_var}" + eval "${!cmd_var}" + i=$((i + 1)) # Zähler erhöhen + else + break # Schleife beenden, wenn keine weitere Variable gesetzt ist + fi +done \ No newline at end of file From 8bfa18d40d101d0cb76f96b0a3eedd7c3fa272ff Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sun, 2 Feb 2025 15:05:41 +0100 Subject: [PATCH 3/3] Update rootfs/etc/nginx/nginx.conf --- rootfs/etc/nginx/nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf index f8e0c4e..e1eb3e6 100644 --- a/rootfs/etc/nginx/nginx.conf +++ b/rootfs/etc/nginx/nginx.conf @@ -72,15 +72,17 @@ http { location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php-fpm.sock; + fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_index index.php; include fastcgi_params; # Pass the original forwarded_scheme and HTTPS status to the PHP backend fastcgi_param HTTP_X_FORWARDED_PROTO $forwarded_scheme; fastcgi_param HTTPS $https if_not_empty; + + internal; }