From 574c1769200ae88c185b5cc8e70d9d11d76d3635 Mon Sep 17 00:00:00 2001 From: James Deathe Date: Sat, 27 Jul 2019 16:44:56 +0100 Subject: [PATCH] #222: Updates php-hello-world app to 0.13.0. --- CHANGELOG.md | 1 + Dockerfile | 12 ++++-------- src/usr/sbin/httpd-bootstrap | 15 +++++++++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94632c3..382c7ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Summary of release changes. ### 2.2.1 - Unreleased +- Updates php-hello-world to [0.13.0](https://github.com/jdeathe/php-hello-world/releases/tag/0.13.0). - Adds setting PHP `date.timezone` to `PHP_OPTIONS_DATE_TIMEZONE` into service configuration; removes dependency on app package configuration. - Adds session PHP settings into service configuration; removes dependency on app package configuration. diff --git a/Dockerfile b/Dockerfile index 19bb434..d57e17f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM jdeathe/centos-ssh:2.6.0 # Use the form ([{fqdn}-]{package-name}|[{fqdn}-]{provider-name}) ARG PACKAGE_NAME="app" ARG PACKAGE_PATH="/opt/${PACKAGE_NAME}" -ARG PACKAGE_RELEASE_VERSION="0.12.0" +ARG PACKAGE_RELEASE_VERSION="0.13.0" ARG RELEASE_VERSION="2.2.0" # ------------------------------------------------------------------------------ @@ -47,9 +47,9 @@ ADD src / # - Disable Apache default fcgid configuration; replaced with 00-fcgid.conf # - Custom Apache configuration # - Disable all Apache modules and enable the minimum -# - Disable SSL # - Disable the default SSL Virtual Host -# - Global PHP configuration changes +# - Disable SSL +# - Add default PHP configuration overrides to 00-php.ini drop-in. # - Replace placeholders with values in systemd service unit template # - Set permissions # ------------------------------------------------------------------------------ @@ -215,9 +215,6 @@ RUN mkdir -p -m 750 ${PACKAGE_PATH} \ && mv \ ${PACKAGE_PATH}/public \ ${PACKAGE_PATH}/public_html \ - && rm -f \ - ${PACKAGE_PATH}/bin/php-wrapper \ - ${PACKAGE_PATH}/etc/httpd/conf.d/50-fcgid.conf \ && $(\ if [[ -f /usr/share/php-pecl-apc/apc.php ]]; then \ cp \ @@ -228,8 +225,7 @@ RUN mkdir -p -m 750 ${PACKAGE_PATH} \ && chown -R app:app-www ${PACKAGE_PATH} \ && find ${PACKAGE_PATH} -type d -exec chmod 750 {} + \ && find ${PACKAGE_PATH}/var -type d -exec chmod 770 {} + \ - && find ${PACKAGE_PATH} -type f -exec chmod 640 {} + \ - && find ${PACKAGE_PATH}/bin -type f -exec chmod 750 {} + + && find ${PACKAGE_PATH} -type f -exec chmod 640 {} + EXPOSE 80 443 8443 diff --git a/src/usr/sbin/httpd-bootstrap b/src/usr/sbin/httpd-bootstrap index 889e684..8c71aea 100644 --- a/src/usr/sbin/httpd-bootstrap +++ b/src/usr/sbin/httpd-bootstrap @@ -1900,13 +1900,20 @@ function main () __enable_apache_modules )" - # Set ownership for fcgid php-wrapper and socket if necessary - if [[ -d /var/run/mod_fcgid ]] \ - && [[ -d ${package_path}/bin ]] + # Set ownership for fcgid socket + if [[ -d /var/run/mod_fcgid ]] then chown -R \ "${apache_run_user}":"${apache_run_group}" \ - {"${package_path}"/bin,/var/run/mod_fcgid} + /var/run/mod_fcgid + fi + + # Set ownership for any package binaries + if [[ -d ${package_path}/bin ]] + then + chown -R \ + "${apache_run_user}":"${apache_run_group}" \ + "${package_path}"/bin fi __init_datadir \