[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 99c4e8ded5
commit f5df7edc6c
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 ----------------------------
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/')

View File

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