From 35b557e9e587c8e4ef2a6e9c6ce6ec8c736002de Mon Sep 17 00:00:00 2001 From: Voop Date: Tue, 17 Feb 2026 19:26:59 +0200 Subject: [PATCH 1/7] LE Cert Script command changes and disabled aarch64 workflow --- .../build_containers_aarch64.yml | 0 core_files/intcmd/letsencrypt/createLECert.sh | 16 +++++++ .../intcmd/letsencrypt/renewLEAllCert.sh | 42 ++++++++++++++++--- 3 files changed, 52 insertions(+), 6 deletions(-) rename .github/{workflows => disabled_workflows}/build_containers_aarch64.yml (100%) diff --git a/.github/workflows/build_containers_aarch64.yml b/.github/disabled_workflows/build_containers_aarch64.yml similarity index 100% rename from .github/workflows/build_containers_aarch64.yml rename to .github/disabled_workflows/build_containers_aarch64.yml diff --git a/core_files/intcmd/letsencrypt/createLECert.sh b/core_files/intcmd/letsencrypt/createLECert.sh index f390531..8348311 100644 --- a/core_files/intcmd/letsencrypt/createLECert.sh +++ b/core_files/intcmd/letsencrypt/createLECert.sh @@ -17,15 +17,31 @@ if ! checkDir $sslDirPath; then fi WEBROOT_OPTS="--webroot --webroot-path $certStuffRoot" +CLOUDFLARE_USED=false if [ -f "/cloudflare-account.ini" ]; then echo "Using CloudFlare API for DNS" WEBROOT_OPTS="--dns-cloudflare --dns-cloudflare-credentials /cloudflare-account.ini" + unset CLOUDFLARE_USED + CLOUDFLARE_USED=true fi echo "Creating a cert for ${1}" certbot certonly --config-dir $sslDirPath $WEBROOT_OPTS -n --agree-tos --register-unsafely-without-email -d ${1} if [ $? -ne 0 ]; then echo "[Failure] Unable to create certificate '${1}' due to an error" + if [ $CLOUDFLARE_USED = true ]; then + echo "If you are using CloudFlare DNS, make sure your API key and email are correct in /cloudflare-account.ini! Using webroot method!" + unset WEBROOT_OPTS + WEBROOT_OPTS="--webroot --webroot-path $certStuffRoot" + certbot certonly --config-dir $sslDirPath $WEBROOT_OPTS -n --agree-tos --register-unsafely-without-email -d ${1} + if [ $? -ne 0 ]; then + echo "[Failure] Unable to create certificate '${1}' using webroot method as well. Please check your configuration and try again." + exit 1 + else + echo "Certificate created successfully using webroot method. Please check your configuration for CloudFlare DNS and try again if you want to use that method." + exit 0 + fi + fi exit 1 else echo "End of script have a nice day! Enjoy you're new cert if it was created" diff --git a/core_files/intcmd/letsencrypt/renewLEAllCert.sh b/core_files/intcmd/letsencrypt/renewLEAllCert.sh index 384df00..cb92ee8 100644 --- a/core_files/intcmd/letsencrypt/renewLEAllCert.sh +++ b/core_files/intcmd/letsencrypt/renewLEAllCert.sh @@ -9,6 +9,7 @@ checkFile() { certStuffRoot="/web/cert_webroot" sslDirPath="/web/ssl" +sslLiveDirPath="/web/ssl/live" logFile="/scripts/letsencrypt/letsencrypt-renew.log" if ! checkDir $certStuffRoot; then @@ -26,10 +27,39 @@ if ! checkFile $logFile; then touch $logFile fi -WEBROOT_OPTS="--webroot --webroot-path $certStuffRoot" -if [ -f "/cloudflare-account.ini" ]; then - echo "Using CloudFlare API for DNS" - WEBROOT_OPTS="--dns-cloudflare --dns-cloudflare-credentials /cloudflare-account.ini" -fi +function renew() { + local certName="$1" + local WEBROOT_OPTS="--webroot --webroot-path $certStuffRoot" + local CLOUDFLARE_USED=false + if [ -f "/cloudflare-account.ini" ]; then + echo "Using CloudFlare API for DNS" + WEBROOT_OPTS="--dns-cloudflare --dns-cloudflare-credentials /cloudflare-account.ini" + CLOUDFLARE_USED=true + fi + echo "Renewing certificate for $certName" + certbot renew --config-dir $sslDirPath $WEBROOT_OPTS --cert-name "$certName" + if [ $? -ne 0 ]; then + echo "Failed to renew certificate for $certName" + if [ "$CLOUDFLARE_USED" = true ]; then + echo "Please check your CloudFlare API credentials and permissions. Using webroot method as a fallback." + unset WEBROOT_OPTS + WEBROOT_OPTS="--webroot --webroot-path $certStuffRoot" + certbot renew --config-dir $sslDirPath $WEBROOT_OPTS --cert-name "$certName" + if [ $? -ne 0 ]; then + echo "Failed to renew certificate for $certName using webroot method as well." + return 1 + else + echo "Successfully renewed certificate for $certName using webroot method." + return 0 + fi + fi + return 1 + fi +} -certbot renew --config-dir $sslDirPath $WEBROOT_OPTS >> /scripts/letsencrypt/letsencrypt-renew.log \ No newline at end of file +for certPath in "$sslLiveDirPath"/*; do + if [ -d "$certPath" ]; then + certName=$(basename "$certPath") + renew "$certName" + fi +done From b47ec154f5a79ddbea0916d9d9523bed73d6febe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:52:15 +0000 Subject: [PATCH 2/7] Bump aquasecurity/trivy-action in /.github/workflows Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.33.1 to 0.34.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.33.1...0.34.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-version: 0.34.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/build_container_template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_container_template.yml b/.github/workflows/build_container_template.yml index 71d2579..b5c6f45 100644 --- a/.github/workflows/build_container_template.yml +++ b/.github/workflows/build_container_template.yml @@ -100,7 +100,7 @@ jobs: ./build-images.sh $BSH_ARG - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.33.1 + uses: aquasecurity/trivy-action@0.34.0 with: scan-type: 'image' image-ref: '${{ inputs.image_name }}:${{ inputs.type }}-${{ inputs.image_tag }}' From d46e64d4a45ca633718d5998214ebcb707fecf5a Mon Sep 17 00:00:00 2001 From: Voop Date: Fri, 20 Feb 2026 21:57:17 +0200 Subject: [PATCH 3/7] Added a path check for PHP running and applying the correct 777 permissions --- core_files/intcmd/applypermissions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core_files/intcmd/applypermissions.sh b/core_files/intcmd/applypermissions.sh index ff3bddf..d2aee77 100644 --- a/core_files/intcmd/applypermissions.sh +++ b/core_files/intcmd/applypermissions.sh @@ -7,7 +7,12 @@ while true; do for path in "${WWWDATA_PATHS[@]}"; do if [[ -d "$path" ]]; then echo "[INFO] Setting permissions for $path to $WWDATA_PERMISSION_CODE" - chmod -R "$WWDATA_PERMISSION_CODE" "$path" + FINAL_PERMCODE="$WWDATA_PERMISSION_CODE" + if [[ "$path" == "/run/php" ]]; then + FINAL_PERMCODE=0777 + echo "[INFO] Special case for $path: setting permissions to $FINAL_PERMCODE" + fi + chmod -R "$FINAL_PERMCODE" "$path" if [[ $? -ne 0 ]]; then echo "[ERROR] Failed to set permissions for $path" else From b0efef1c8e44457ab7866faed71fe249378c2233 Mon Sep 17 00:00:00 2001 From: Voop Date: Fri, 20 Feb 2026 22:09:56 +0200 Subject: [PATCH 4/7] Reverting and troubleshooting --- core_files/intcmd/applypermissions.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core_files/intcmd/applypermissions.sh b/core_files/intcmd/applypermissions.sh index d2aee77..8af6b01 100644 --- a/core_files/intcmd/applypermissions.sh +++ b/core_files/intcmd/applypermissions.sh @@ -1,18 +1,13 @@ #!/usr/bin/env bash WWDATA_PERMISSION_CODE=0755 -WWWDATA_PATHS=("/run/php" "/web" "/usr/local/openresty") +WWWDATA_PATHS=("/web" "/usr/local/openresty") while true; do for path in "${WWWDATA_PATHS[@]}"; do if [[ -d "$path" ]]; then echo "[INFO] Setting permissions for $path to $WWDATA_PERMISSION_CODE" - FINAL_PERMCODE="$WWDATA_PERMISSION_CODE" - if [[ "$path" == "/run/php" ]]; then - FINAL_PERMCODE=0777 - echo "[INFO] Special case for $path: setting permissions to $FINAL_PERMCODE" - fi - chmod -R "$FINAL_PERMCODE" "$path" + chmod -R "$WWDATA_PERMISSION_CODE" "$path" if [[ $? -ne 0 ]]; then echo "[ERROR] Failed to set permissions for $path" else From f0dbd1e79b61639640a252f5ed3b5c54b64385ff Mon Sep 17 00:00:00 2001 From: Voop Date: Fri, 20 Feb 2026 22:19:11 +0200 Subject: [PATCH 5/7] Updated PHPFpm Restart Command --- core_files/intcmd/reloadPHPfpm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core_files/intcmd/reloadPHPfpm.sh b/core_files/intcmd/reloadPHPfpm.sh index 5a24dea..edea8be 100644 --- a/core_files/intcmd/reloadPHPfpm.sh +++ b/core_files/intcmd/reloadPHPfpm.sh @@ -21,5 +21,8 @@ function reloadService() { echo "$service_name started successfully." } +chmod 0777 -R /run/php +chown www-data:www-data -R /run/php + reloadService "php7.4-fpm" reloadService "php8.3-fpm" \ No newline at end of file From 3f799574b35f39e9c866ef3751afaa11cb0c84b4 Mon Sep 17 00:00:00 2001 From: Voop Date: Fri, 20 Feb 2026 22:32:11 +0200 Subject: [PATCH 6/7] Im too tired --- core_files/intcmd/applypermissions.sh | 9 +++++++-- openresty-build/Dockerfile | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core_files/intcmd/applypermissions.sh b/core_files/intcmd/applypermissions.sh index 8af6b01..d2aee77 100644 --- a/core_files/intcmd/applypermissions.sh +++ b/core_files/intcmd/applypermissions.sh @@ -1,13 +1,18 @@ #!/usr/bin/env bash WWDATA_PERMISSION_CODE=0755 -WWWDATA_PATHS=("/web" "/usr/local/openresty") +WWWDATA_PATHS=("/run/php" "/web" "/usr/local/openresty") while true; do for path in "${WWWDATA_PATHS[@]}"; do if [[ -d "$path" ]]; then echo "[INFO] Setting permissions for $path to $WWDATA_PERMISSION_CODE" - chmod -R "$WWDATA_PERMISSION_CODE" "$path" + FINAL_PERMCODE="$WWDATA_PERMISSION_CODE" + if [[ "$path" == "/run/php" ]]; then + FINAL_PERMCODE=0777 + echo "[INFO] Special case for $path: setting permissions to $FINAL_PERMCODE" + fi + chmod -R "$FINAL_PERMCODE" "$path" if [[ $? -ne 0 ]]; then echo "[ERROR] Failed to set permissions for $path" else diff --git a/openresty-build/Dockerfile b/openresty-build/Dockerfile index 242f625..aee9166 100644 --- a/openresty-build/Dockerfile +++ b/openresty-build/Dockerfile @@ -1,6 +1,6 @@ -ARG BASE_IMAGE=vooplv/webcontainer:core-main +ARG BASE_IMAGE=vooplv/webcontainer:core-develop #FROM ${BASE_IMAGE} -FROM vooplv/webcontainer:core-main +FROM vooplv/webcontainer:core-develop ENV DEBIAN_FRONTEND=noninteractive From a9308071d181540771bd1d82129dec88fc9451e9 Mon Sep 17 00:00:00 2001 From: Voop Date: Fri, 20 Feb 2026 22:43:29 +0200 Subject: [PATCH 7/7] Prep for sync --- openresty-build/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openresty-build/Dockerfile b/openresty-build/Dockerfile index aee9166..242f625 100644 --- a/openresty-build/Dockerfile +++ b/openresty-build/Dockerfile @@ -1,6 +1,6 @@ -ARG BASE_IMAGE=vooplv/webcontainer:core-develop +ARG BASE_IMAGE=vooplv/webcontainer:core-main #FROM ${BASE_IMAGE} -FROM vooplv/webcontainer:core-develop +FROM vooplv/webcontainer:core-main ENV DEBIAN_FRONTEND=noninteractive