From a1f703cae8b7bd7dc1771e27163b9dd65221748d Mon Sep 17 00:00:00 2001 From: Philip Almueti Date: Sat, 19 Sep 2020 14:33:45 -0700 Subject: [PATCH 1/3] Resolving php-local.ini mangling --- root/etc/cont-init.d/50-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 0f3c8cb..12a0a47 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -61,8 +61,8 @@ fi [ -n "${APP_URL}" ] && sed -r "s,([#\s]*)?APP_URL=.*,APP_URL=${APP_URL},g" -i /config/www/.env ## Bump php upload max filesize and post max size to 100MB by default -grep -qxF 'upload_max_filesize' /config/php/php-local.ini || echo 'upload_max_filesize = 100MB' >> /config/php/php-local.ini -grep -qxF 'post_max_size' /config/php/php-local.ini || echo 'post_max_size = 100MB' >> /config/php/php-local.ini +grep -qx 'upload_max_filesize' /config/php/php-local.ini || echo 'upload_max_filesize = 100M' >> /config/php/php-local.ini +grep -qx 'post_max_size' /config/php/php-local.ini || echo 'post_max_size = 100M' >> /config/php/php-local.ini # check for the mysql endpoint for 30 seconds END=$((SECONDS+30)) From 047e84e2d2011bf19600272ffc3ae7e6af5b2b0c Mon Sep 17 00:00:00 2001 From: Philip Almueti Date: Sat, 19 Sep 2020 14:39:56 -0700 Subject: [PATCH 2/3] Adding appropriate regex from original command --- root/etc/cont-init.d/50-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 12a0a47..39b6626 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -61,8 +61,8 @@ fi [ -n "${APP_URL}" ] && sed -r "s,([#\s]*)?APP_URL=.*,APP_URL=${APP_URL},g" -i /config/www/.env ## Bump php upload max filesize and post max size to 100MB by default -grep -qx 'upload_max_filesize' /config/php/php-local.ini || echo 'upload_max_filesize = 100M' >> /config/php/php-local.ini -grep -qx 'post_max_size' /config/php/php-local.ini || echo 'post_max_size = 100M' >> /config/php/php-local.ini +grep -qx '^upload_max_filesize.*$' /config/php/php-local.ini || echo 'upload_max_filesize = 100M' >> /config/php/php-local.ini +grep -qx '^post_max_size.*$' /config/php/php-local.ini || echo 'post_max_size = 100M' >> /config/php/php-local.ini # check for the mysql endpoint for 30 seconds END=$((SECONDS+30)) From 608466e6e07ae15bc87ccb96efd20e1df1aaf2b7 Mon Sep 17 00:00:00 2001 From: Philip Almueti Date: Sat, 19 Sep 2020 15:10:26 -0700 Subject: [PATCH 3/3] Patching previously added erronous lines by replacing them with empty lines instead. --- root/etc/cont-init.d/50-config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 39b6626..d512eef 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -64,6 +64,12 @@ fi grep -qx '^upload_max_filesize.*$' /config/php/php-local.ini || echo 'upload_max_filesize = 100M' >> /config/php/php-local.ini grep -qx '^post_max_size.*$' /config/php/php-local.ini || echo 'post_max_size = 100M' >> /config/php/php-local.ini + +## TODO: Remove this following bit by 12/19/2020 +# Remove erronously added configs post-init +sed -i "s/^upload_max_filesize = 100MB$//g" /config/php/php-local.ini +sed -i "s/^post_max_size = 100MB$//g" /config/php/php-local.ini + # check for the mysql endpoint for 30 seconds END=$((SECONDS+30)) while [ ${SECONDS} -lt ${END} ] && [ -n "${DB_HOST+x}" ]; do