From 772c606790ca69eaf9cb1a28a56fe2c43027a95d Mon Sep 17 00:00:00 2001 From: MBorne Date: Thu, 16 Nov 2023 16:23:14 +0100 Subject: [PATCH] fix(sigterm): add missing exec in application.sh and missing extension pcntl in docker image (refs #59) --- .docker/Dockerfile | 4 ++-- .docker/application.sh | 2 +- composer.json | 1 + docker-compose.yml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 3716a63..84b0177 100755 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -6,7 +6,7 @@ FROM composer:2.3 as vendor RUN mkdir -p /opt/validator-api WORKDIR /opt/validator-api COPY composer.json . -RUN composer install --no-scripts --prefer-dist +RUN composer install --no-scripts --prefer-dist --ignore-platform-req=ext-pcntl #---------------------------------------------------------------------- # Create base layer for dev and production @@ -49,7 +49,7 @@ COPY .docker/php.ini /usr/local/etc/php/conf.d/app.ini RUN apt-get update -qq \ && apt-get install -y postgresql-client libpq-dev libzip-dev \ && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \ - && docker-php-ext-install opcache pdo pdo_pgsql pgsql zip \ + && docker-php-ext-install opcache pdo pdo_pgsql pgsql zip pcntl \ && rm -rf /var/lib/apt/lists/* #---------------------------------------------------------------------- diff --git a/.docker/application.sh b/.docker/application.sh index bf42942..32cb089 100755 --- a/.docker/application.sh +++ b/.docker/application.sh @@ -33,7 +33,7 @@ run(){ } backend(){ - bash loop-validate.sh + exec bash loop-validate.sh } test(){ diff --git a/composer.json b/composer.json index a089b9a..ead708a 100755 --- a/composer.json +++ b/composer.json @@ -8,6 +8,7 @@ "ext-ctype": "*", "ext-iconv": "*", "ext-zip": "*", + "ext-pcntl": "*", "composer/package-versions-deprecated": "^1.11", "doctrine/annotations": "^1.10", "doctrine/doctrine-bundle": "^2.1", diff --git a/docker-compose.yml b/docker-compose.yml index c7a9164..c122479 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,7 +60,7 @@ services: #----------------------------------------------------------------------- backend: image: ignf/validator-api:master-dev - command: ["/bin/bash","loop-validate.sh"] + command: [".docker/application.sh","backend"] environment: - HTTP_PROXY=${HTTP_PROXY} - HTTPS_PROXY=${HTTPS_PROXY}