From 9a435748722de22f91a3056b079e71755a140138 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 22 Apr 2026 21:18:44 -0700 Subject: [PATCH 1/7] Add postgres and xdebug support --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index eed2b67..041b459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \ zip \ unzip \ libgmp-dev \ + libpq-dev \ $PHPIZE_DEPS \ && rm -rf /var/lib/apt/lists/* @@ -23,6 +24,8 @@ RUN docker-php-ext-configure gd \ RUN docker-php-ext-install -j$(nproc) \ mysqli \ pdo_mysql \ + pdo_pgsql \ + pgsql \ gd \ zip \ intl \ @@ -33,6 +36,11 @@ RUN docker-php-ext-install -j$(nproc) \ RUN pecl install redis \ && docker-php-ext-enable redis +# install xdebug but leave it off by default +RUN pecl install xdebug \ + && docker-php-ext-enable xdebug \ + && echo "xdebug.mode=off" > /usr/local/etc/php/conf.d/xdebug.ini + # ---- install core extensions required by IPB 4.7 ---- RUN echo "memory_limit=256M" > /usr/local/etc/php/conf.d/memory.ini \ && echo "upload_max_filesize=100M" > /usr/local/etc/php/conf.d/uploads.ini \ From c5753f6bd9ac3a4e12dc96090822c8fef609d863 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 22 Apr 2026 21:31:14 -0700 Subject: [PATCH 2/7] Create entrypoint.sh --- entrypoint.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..21e7f69 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -n "$ENABLE_XDEBUG" ]]; then + cat > /usr/local/etc/php/conf.d/xdebug.ini < Date: Wed, 22 Apr 2026 21:39:11 -0700 Subject: [PATCH 3/7] Update Dockerfile --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 041b459..16340e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM php:8.3-fpm +COPY --chmod=0755 entrypoint.sh /entrypoint.sh + # ---- system deps (required for compiling PHP extensions) ---- RUN apt-get update && apt-get install -y \ libpng-dev \ @@ -38,11 +40,12 @@ RUN pecl install redis \ # install xdebug but leave it off by default RUN pecl install xdebug \ - && docker-php-ext-enable xdebug \ - && echo "xdebug.mode=off" > /usr/local/etc/php/conf.d/xdebug.ini + && docker-php-ext-enable xdebug # ---- install core extensions required by IPB 4.7 ---- RUN echo "memory_limit=256M" > /usr/local/etc/php/conf.d/memory.ini \ && echo "upload_max_filesize=100M" > /usr/local/etc/php/conf.d/uploads.ini \ && echo "post_max_size=100M" >> /usr/local/etc/php/conf.d/uploads.ini \ && echo "opcache.enable=1" > /usr/local/etc/php/conf.d/opcache.ini + +ENTRYPOINT ["/entrypoint.sh"] From 8f8d14ea42602cac50615e735148f006dc6f4159 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 22 Apr 2026 21:42:34 -0700 Subject: [PATCH 4/7] Update entrypoint.sh --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 21e7f69..718bf7d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh -if [[ -n "$ENABLE_XDEBUG" ]]; then +if [ -n "$ENABLE_XDEBUG" ]; then cat > /usr/local/etc/php/conf.d/xdebug.ini < Date: Wed, 22 Apr 2026 21:42:51 -0700 Subject: [PATCH 5/7] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 16340e7..4a50ee7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,3 +49,4 @@ RUN echo "memory_limit=256M" > /usr/local/etc/php/conf.d/memory.ini \ && echo "opcache.enable=1" > /usr/local/etc/php/conf.d/opcache.ini ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] From d03d9367fe6ec68a6f5456541941977e893160c9 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 22 Apr 2026 21:43:54 -0700 Subject: [PATCH 6/7] Update entrypoint.sh --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 718bf7d..faf0771 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,7 +7,8 @@ xdebug.client_host=${XDEBUG_CLIENT:-host.docker.internal} xdebug.start_with_request=yes EOF else - rm -f /usr/local/etc/php/conf.d/xdebug.ini + echo "; xdebug disabled" > /usr/local/etc/php/conf.d/xdebug.ini + echo "xdebug.mode=off" >> /usr/local/etc/php/conf.d/xdebug.ini fi exec "$@" From 7d8275717f9faa7dae406dd64051ce6b6a6ca145 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 22 Apr 2026 21:45:45 -0700 Subject: [PATCH 7/7] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a50ee7..bfa2849 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,9 +38,10 @@ RUN docker-php-ext-install -j$(nproc) \ RUN pecl install redis \ && docker-php-ext-enable redis -# install xdebug but leave it off by default +# install xdebug but leave it off by default (configured in entrypoint) RUN pecl install xdebug \ - && docker-php-ext-enable xdebug + && docker-php-ext-enable xdebug \ + && docker-php-source delete # ---- install core extensions required by IPB 4.7 ---- RUN echo "memory_limit=256M" > /usr/local/etc/php/conf.d/memory.ini \