From 52310fd21a0a3d22638ded8846e95204e9298ce6 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 16 Dec 2024 12:05:16 +0100 Subject: [PATCH] add debug dev --- docker/production/Dockerfile | 3 +++ docker/production/entrypoint.d/99-debug-mode.sh | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 docker/production/entrypoint.d/99-debug-mode.sh diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile index 09281a666..419cac393 100644 --- a/docker/production/Dockerfile +++ b/docker/production/Dockerfile @@ -99,6 +99,9 @@ RUN mkdir -p /usr/local/bin && \ COPY docker/production/etc/php/conf.d/zzz-custom-php.ini /usr/local/etc/php/conf.d/zzz-custom-php.ini ENV PHP_OPCACHE_ENABLE=1 +# Configure entrypoint +COPY --chmod=755 docker/production/entrypoint.d/ /usr/local/bin/entrypoint.d/ + # Copy application files from previous stages COPY --from=base --chown=www-data:www-data /var/www/html/vendor ./vendor COPY --from=static-assets --chown=www-data:www-data /app/public/build ./public/build diff --git a/docker/production/entrypoint.d/99-debug-mode.sh b/docker/production/entrypoint.d/99-debug-mode.sh new file mode 100644 index 000000000..d1c8e5aa8 --- /dev/null +++ b/docker/production/entrypoint.d/99-debug-mode.sh @@ -0,0 +1,6 @@ +# Debug mode +if [ "$DEBUG" = "true" ]; then + echo "Debug mode is enabled" + echo "Installing development dependencies..." + composer install --dev --no-scripts +fi