From ff771223afc4ea2c5668233651ec7f3f6e486085 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Thu, 1 Apr 2021 13:17:25 +0000 Subject: [PATCH] [DOCKER][TOOLS] Add option to bin/configure to use a prebuilt PHP container (https://hub.docker.com/repository/docker/gsocial/php) --- bin/configure | 10 ++++++++++ docker/php/docker-compose.fragment.sh | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bin/configure b/bin/configure index ff1e414415..d325fcd6b4 100755 --- a/bin/configure +++ b/bin/configure @@ -137,6 +137,15 @@ fi # -------------------------------------------------------------------------- +# -------------------------------- PHP ------------------------------------- +if echo "${DOCKER}" | grep -Fq '"php"'; then + ${WHIPTAIL} --title "Build PHP container locally?" --clear --backtitle 'GNU social' \ + --yesno "\nDo you want to use a compile the needed PHP extensions and build the container locally? (may provide better performance, needs more than 1GiB of RAM)" 0 0 \ + 3>&1 1>&2 2>&3 + BUILD_PHP=$((1-$?)) # Invert output +fi +# -------------------------------------------------------------------------- + # ------------------------ Network configuration ---------------------------- while true; do @@ -386,6 +395,7 @@ export NGINX_HTTP_PORT="${NGINX_HTTP_PORT}" export NGINX_HTTPS_PORT="${NGINX_HTTPS_PORT}" export PHP_PORT="${PHP_PORT}" export DBMS="${DBMS}" +export BUILD_PHP="${BUILD_PHP}" for SERV in ${DOCKER}; do SERV=$(echo "${SERV}" | sed -r 's/"([^"]*)"/\1/') diff --git a/docker/php/docker-compose.fragment.sh b/docker/php/docker-compose.fragment.sh index c4e162c9c5..81e6ea60da 100644 --- a/docker/php/docker-compose.fragment.sh +++ b/docker/php/docker-compose.fragment.sh @@ -1,10 +1,16 @@ #!/usr/bin/sh -cat <