[DOCKER][TOOLS] Add option to bin/configure to use a prebuilt PHP container (https://hub.docker.com/repository/docker/gsocial/php)

This commit is contained in:
Hugo Sales 2021-04-01 13:17:25 +00:00
parent c8b2a7a2e0
commit ff771223af
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 18 additions and 2 deletions

10
bin/configure vendored
View File

@ -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 ---------------------------- # ------------------------ Network configuration ----------------------------
while true; do while true; do
@ -386,6 +395,7 @@ export NGINX_HTTP_PORT="${NGINX_HTTP_PORT}"
export NGINX_HTTPS_PORT="${NGINX_HTTPS_PORT}" export NGINX_HTTPS_PORT="${NGINX_HTTPS_PORT}"
export PHP_PORT="${PHP_PORT}" export PHP_PORT="${PHP_PORT}"
export DBMS="${DBMS}" export DBMS="${DBMS}"
export BUILD_PHP="${BUILD_PHP}"
for SERV in ${DOCKER}; do for SERV in ${DOCKER}; do
SERV=$(echo "${SERV}" | sed -r 's/"([^"]*)"/\1/') SERV=$(echo "${SERV}" | sed -r 's/"([^"]*)"/\1/')

View File

@ -1,10 +1,16 @@
#!/usr/bin/sh #!/usr/bin/sh
cat <<EOF if [ $LE_CERT -ne 0 ]; then
cat <<EOF
php: php:
build: docker/php build: docker/php
EOF EOF
else
cat <<EOF
php:
image: gsocial/php
EOF
fi
# If the user wants a DB docker container # If the user wants a DB docker container
if echo "${DOCKER}" | grep -Fvq '"db"'; then if echo "${DOCKER}" | grep -Fvq '"db"'; then