This commit is contained in:
Philip Peterson 2026-06-05 00:04:37 -07:00
parent 27e2b6f2d9
commit 69e6ef3e8b
2 changed files with 8 additions and 6 deletions

View file

@ -81,17 +81,16 @@ COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY docker/php/entrypoint.sh /entrypoint.sh COPY docker/php/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
# Pass container env vars through to PHP-FPM workers; capture worker stderr so errors appear in container logs. # Pass container env vars through to PHP-FPM workers; log errors to /var/log.
RUN { \ RUN sed -i 's|;error_log = log/php-fpm.log|error_log = /var/log/php-fpm.log|' /usr/local/etc/php-fpm.conf && \
{ \
echo 'clear_env = no'; \ echo 'clear_env = no'; \
echo 'catch_workers_output = yes'; \ echo 'catch_workers_output = yes'; \
echo 'php_admin_flag[log_errors] = on'; \ echo 'php_admin_flag[log_errors] = on'; \
echo 'php_admin_value[error_log] = /dev/stderr'; \ echo 'php_admin_value[error_log] = /var/log/php-fpm.www.log'; \
} >> /usr/local/etc/php-fpm.d/zz-env.conf } >> /usr/local/etc/php-fpm.d/zz-env.conf
RUN chown -R www-data:www-data web/sites/default/files && \ RUN chmod 444 web/sites/default/settings.php
chmod -R 755 web/sites/default/files && \
chmod 444 web/sites/default/settings.php
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View file

@ -12,6 +12,9 @@ for var in SITE_NAME ADMIN_PASS; do
fi fi
done done
chown -R www-data:www-data /var/www/html/web/sites/default/files
chmod -R 755 /var/www/html/web/sites/default/files
echo "[entrypoint] Waiting for PostgreSQL at ${DB_HOST}..." echo "[entrypoint] Waiting for PostgreSQL at ${DB_HOST}..."
until pg_isready -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -q; do until pg_isready -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -q; do
sleep 1 sleep 1