Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 7.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgdesign/nginx:alpine-3.12-1.3.2
FROM bcgdesign/nginx:alpine-3.12-1.4.1

LABEL maintainer="Ben Green <ben@bcgdesign.com>" \
org.label-schema.name="Nginx + PHP" \
Expand Down
2 changes: 1 addition & 1 deletion 7.3/php-fpm/run
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set -euo pipefail
#======================================================================================================================

VERSION=$(php -r "echo PHP_VERSION;")
_echo "Starting PHP v${VERSION} - FastCGI Process Manager"
bcg-echo "Starting PHP v${VERSION} - FastCGI Process Manager"
php-fpm7 -F
2 changes: 1 addition & 1 deletion 7.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgdesign/nginx:alpine-3.13-1.3.2
FROM bcgdesign/nginx:alpine-3.13-1.4.1

LABEL maintainer="Ben Green <ben@bcgdesign.com>" \
org.label-schema.name="Nginx + PHP" \
Expand Down
2 changes: 1 addition & 1 deletion 7.4/php-fpm/run
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set -euo pipefail
#======================================================================================================================

VERSION=$(php -r "echo PHP_VERSION;")
_echo "Starting PHP v${VERSION} - FastCGI Process Manager"
bcg-echo "Starting PHP v${VERSION} - FastCGI Process Manager"
php-fpm7 -F
2 changes: 1 addition & 1 deletion 8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgdesign/nginx:alpine-3.13-1.3.2
FROM bcgdesign/nginx:alpine-3.13-1.4.1

LABEL maintainer="Ben Green <ben@bcgdesign.com>" \
org.label-schema.name="Nginx + PHP" \
Expand Down
2 changes: 1 addition & 1 deletion 8.0/php-fpm/run
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set -euo pipefail
#======================================================================================================================

VERSION=$(php -r "echo PHP_VERSION;")
_echo "Starting PHP v${VERSION} - FastCGI Process Manager"
bcg-echo "Starting PHP v${VERSION} - FastCGI Process Manager"
php-fpm8 -F
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.4.0
4 changes: 2 additions & 2 deletions overlay/etc/cont-init.d/20-php-fpm-config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail
# Optionally override configuration
#======================================================================================================================

_echo "Setting www.conf configuration values..."
bcg-echo "Setting www.conf configuration values..."

declare -A VALUES
VALUES["user"]="www"
Expand All @@ -17,4 +17,4 @@ VALUES["log_level"]="${PHP_FPM_LOG_LEVEL-}"
source /etc/functions/replace.sh
replace VALUES "${PHP_DIR}/php-fpm.d/www.conf"

_done
bcg-done
8 changes: 4 additions & 4 deletions overlay/etc/cont-init.d/21-php-ini-download
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ set -euo pipefail

DOWNLOADED="${PHP_DIR}/php.ini-${PHP_INI}.downloaded"
if [ -e ${DOWNLOADED} ] ; then
_ok "php.ini already downloaded."
bcg-ok "php.ini already downloaded."
exit 0
fi

if [ "${PHP_INI}" = "development" ] || [ "${PHP_INI}" = "production" ] ; then

URL="https://raw.githubusercontent.com/php/php-src/master/php.ini-${PHP_INI}"
_echo "Downloading php.ini from ${URL}..."
bcg-echo "Downloading php.ini from ${URL}..."
wget -O "${PHP_DIR}/php.ini" ${URL} \
&& touch ${DOWNLOADED}
_done
bcg-done

else

_error "Unsupported PHP_INI value: '${PHP_INI}'."
bcg-error "Unsupported PHP_INI value: '${PHP_INI}'."

fi
4 changes: 2 additions & 2 deletions overlay/etc/cont-init.d/22-php-ini-config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail
# Optionally override configuration
#======================================================================================================================

_echo "Setting php.ini configuration values..."
bcg-echo "Setting php.ini configuration values..."

declare -A VALUES
VALUES["display_errors"]="${PHP_INI_DISPLAY_ERRORS-}"
Expand All @@ -22,4 +22,4 @@ VALUES["upload_max_filesize"]="${PHP_INI_MAX_UPLOAD-}"
source /etc/functions/replace.sh
replace VALUES "${PHP_DIR}/php.ini"

_done
bcg-done
2 changes: 1 addition & 1 deletion overlay/etc/functions/replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ replace () {
for KEY in ${!A[@]} ; do
VAL=${A[$KEY]}
if [ ! -z "${VAL}" ] ; then
#_echo " - ${KEY}=${VAL}"
#bcg-echo " - ${KEY}=${VAL}"
sed -i "s|^;\?${KEY}.*$|${KEY} = ${VAL}|i" ${FILE}
fi
done
Expand Down
2 changes: 1 addition & 1 deletion overlay/etc/services.d/php-error-log/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ set -euo pipefail
# Forward PHP errors to Docker
#======================================================================================================================

_forward "php-error-log" "${PHP_INI_ERROR_LOG}"
bcg-forward "php-error-log" "${PHP_INI_ERROR_LOG}"
2 changes: 1 addition & 1 deletion overlay/etc/services.d/php-fpm/finish
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ set -euo pipefail
# Use base executable to terminate all services
#======================================================================================================================

_terminate
bcg-terminate
4 changes: 2 additions & 2 deletions overlay/usr/local/bin/php-clean-sessions
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ set -euo pipefail
# Hat-tip https://www.getpagespeed.com/server-setup/php/cleanup-php-sessions-like-a-pro
#======================================================================================================================

_echo "Cleaning PHP sessions..."
bcg-echo "Cleaning PHP sessions..."
php \
-d session.gc_probability=1 \
-d session.gc_divisor=1 \
-d session.gc_maxlifetime=${PHP_SESSION_MAX_LIFETIME} \
-r "session_start(); session_destroy();"
_done
bcg-done