Skip to content

Commit 5236311

Browse files
committed
Make PHP-FPM port optional and default to 9000 if not set
1 parent 0b83ef5 commit 5236311

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

scripts/docker-entrypoint.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ else
141141

142142
# PHP-FPM port
143143
if ! set | grep '^PHP_FPM_SERVER_PORT=' >/dev/null 2>&1; then
144-
log "err" "PHP-FPM enabled, but \$PHP_FPM_SERVER_PORT not set."
145-
exit 1
146-
fi
147-
if [ "${PHP_FPM_SERVER_PORT}" = "" ]; then
148-
log "err" "PHP-FPM enabled, but \$PHP_FPM_SERVER_PORT is empty."
149-
exit 1
144+
log "info" "PHP-FPM enabled, but \$PHP_FPM_SERVER_PORT not set."
145+
lgo "info" "Defaulting PHP-FPM port to 9000"
146+
PHP_FPM_SERVER_PORT="9000"
147+
elif [ "${PHP_FPM_SERVER_PORT}" = "" ]; then
148+
log "info" "PHP-FPM enabled, but \$PHP_FPM_SERVER_PORT is empty."
149+
lgo "info" "Defaulting PHP-FPM port to 9000"
150+
PHP_FPM_SERVER_PORT="9000"
150151
fi
151152

152153
PHP_FPM_CONFIG="/etc/httpd/conf.d/php-fpm.conf"

0 commit comments

Comments
 (0)