diff --git a/management/utils.py b/management/utils.py index 3f872376..f2df5ad0 100644 --- a/management/utils.py +++ b/management/utils.py @@ -180,6 +180,8 @@ def wait_for_service(port, public, env, timeout): time.sleep(min(timeout/4, 1)) def get_php_version(): + # Gets the version of PHP used by Mail-in-a-Box + # To modify PHP version, also update variable PHP_VER in functions.sh return "8.1" def get_ssh_port(): diff --git a/management/web_update.py b/management/web_update.py index ba853468..cef15f6e 100644 --- a/management/web_update.py +++ b/management/web_update.py @@ -82,6 +82,7 @@ def do_web_update(env): # Build an nginx configuration file. nginx_conf = read_conf("nginx-top.conf") + # Hardcode php version in the nginx configuration file nginx_conf = re.sub("{{phpver}}", get_php_version(), nginx_conf) # Load the templates. diff --git a/setup/functions.sh b/setup/functions.sh index 85925e6c..46355dde 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -5,6 +5,7 @@ # -o pipefail: don't ignore errors in the non-last command in a pipeline set -euo pipefail +# To modify PHP version, also update method get_php_version() in utils.py PHP_VER=8.1 function hide_output {