From 8204465048654e79be4b9db50cf6945470584860 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Thu, 28 Nov 2024 21:35:05 +0100 Subject: [PATCH 01/23] cleanup --- debian/docker-compose.yml | 13 ++----------- debian/php/php-fpm.conf | 1 - debian/scripts/init.sh | 9 ++++----- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/debian/docker-compose.yml b/debian/docker-compose.yml index e5b96c0..a8cab11 100644 --- a/debian/docker-compose.yml +++ b/debian/docker-compose.yml @@ -59,16 +59,7 @@ services: networks: - app-network healthcheck: - test: - [ - "CMD", - "mysqladmin", - "ping", - "-h", - "localhost", - "-u${MYSQL_USER}", - "-p${MYSQL_PASSWORD}", - ] + test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}" ] interval: 10s timeout: 5s retries: 5 @@ -82,7 +73,7 @@ services: networks: - app-network healthcheck: - test: ["CMD", "redis-cli", "ping"] + test: [ "CMD", "redis-cli", "ping" ] interval: 10s timeout: 5s retries: 5 diff --git a/debian/php/php-fpm.conf b/debian/php/php-fpm.conf index aa4e660..63bbada 100644 --- a/debian/php/php-fpm.conf +++ b/debian/php/php-fpm.conf @@ -1,2 +1 @@ -[www] pm.max_children = 10 diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 77a37bf..d0e6da1 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -1,10 +1,10 @@ #!/bin/sh set -e - in_log() { - local type="$1"; shift - printf '%s [%s] [Entrypoint]: %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$type" "$*" + local type="$1" + shift + printf '%s [%s] [Entrypoint]: %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$type" "$*" } docker_process_init_files() { @@ -48,7 +48,6 @@ chown -R www-data:www-data /var/www/html/storage # Clear and cache config in production if [ "$APP_ENV" = "production" ]; then - gosu www-data php artisan config:cache gosu www-data php artisan optimize gosu www-data php artisan package:discover gosu www-data php artisan migrate --force @@ -72,4 +71,4 @@ fi echo "Starting supervisord..." # Start supervisord in the foreground -exec /usr/bin/supervisord -n -c /etc/supervisor/conf.d/supervisord.conf \ No newline at end of file +exec /usr/bin/supervisord -n -c /etc/supervisor/conf.d/supervisord.conf From d139a48303341dc63b16af8a1c6ed61944d9b083 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Fri, 29 Nov 2024 10:26:46 +0100 Subject: [PATCH 02/23] move google-chrome-stable related apt packages to arm64 --- debian/Dockerfile | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 7b9dd26..0009139 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -5,36 +5,17 @@ ARG saxon=12.5.0 # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ + default-mysql-client \ gnupg2 \ gosu \ supervisor \ - default-mysql-client \ - fonts-liberation \ fonts-noto-cjk \ fonts-noto-cjk-extra \ fonts-wqy-microhei \ fonts-wqy-zenhei \ - libasound2 \ - libatk-bridge2.0-0 \ - libatk1.0-0 \ - libatspi2.0-0 \ - libcups2 \ - libdbus-1-3 \ - libdrm2 \ - libgbm1 \ - libgtk-3-0 \ - libnspr4 \ - libnss3 \ libonig-dev \ libpng-dev \ - libwayland-client0 \ - libxcomposite1 \ - libxdamage1 \ - libxfixes3 \ - libxkbcommon0 \ libxml2-dev \ - libxrandr2 \ - xdg-utils \ xfonts-wqy \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ mkdir -p /etc/apt/keyrings \ @@ -43,6 +24,28 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get update \ && apt-get install -y --no-install-recommends google-chrome-stable; \ fi \ + && if [ "$(dpkg --print-architecture)" = "arm64" ]; then \ + apt-get install -y --no-install-recommends \ + fonts-liberation \ + libasound2 \ + libatk-bridge2.0-0 \ + libatk1.0-0 \ + libatspi2.0-0 \ + libcups2 \ + libdbus-1-3 \ + libdrm2 \ + libgbm1 \ + libgtk-3-0 \ + libnspr4 \ + libnss3 \ + libwayland-client0 \ + libxcomposite1 \ + libxdamage1 \ + libxfixes3 \ + libxkbcommon0 \ + libxrandr2 \ + xdg-utils \ + fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -119,10 +122,6 @@ COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add initialization script COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh -# Configure PHP-FPM -RUN sed -i "s/user = www-data/user = www-data/g" /usr/local/etc/php-fpm.d/www.conf \ - && sed -i "s/group = www-data/group = www-data/g" /usr/local/etc/php-fpm.d/www.conf - # Create volume directories RUN mkdir -p \ /var/www/html/storage/app/public \ From 641b5277026327b408b04a52303b51035e2b8d87 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Fri, 29 Nov 2024 10:48:14 +0100 Subject: [PATCH 03/23] fix if else --- debian/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 0009139..d016e42 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gnupg2 \ gosu \ supervisor \ + # Packages to be checked fonts-noto-cjk \ fonts-noto-cjk-extra \ fonts-wqy-microhei \ @@ -23,9 +24,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && apt-get update \ && apt-get install -y --no-install-recommends google-chrome-stable; \ - fi \ - && if [ "$(dpkg --print-architecture)" = "arm64" ]; then \ + elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \ apt-get install -y --no-install-recommends \ + # Packages for chrome fonts-liberation \ libasound2 \ libatk-bridge2.0-0 \ @@ -44,7 +45,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxfixes3 \ libxkbcommon0 \ libxrandr2 \ - xdg-utils \ + xdg-utils; \ fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* From f722c91d2156ab58ba9e0cf54e999625873d9987 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Fri, 29 Nov 2024 11:04:11 +0100 Subject: [PATCH 04/23] Merge chrome related configuration into one RUN --- debian/Dockerfile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index d016e42..6b21c3d 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -50,25 +50,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Set permissions for www-data to execute +# Configure directories and permissions for chrome RUN mkdir -p /var/www/.chrome/chrome-profile \ + mkdir -p /tmp/chrome \ && chown -R www-data:www-data /var/www/.chrome \ && chmod -R 755 /var/www/.chrome \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ chown root:root /usr/bin/google-chrome \ && chmod 4755 /usr/bin/google-chrome \ && chown -R root:root /opt/google/chrome \ - && chmod -R 755 /opt/google/chrome; \ + && chmod -R 755 /opt/google/chrome \ + && chown -R www-data:www-data /tmp/chrome \ + && chmod -R 755 /tmp/chrome; \ fi \ && chown -R www-data:www-data /var/www -# Create required directories with proper permissions -RUN mkdir -p /tmp/chrome \ - && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ - chown -R www-data:www-data /tmp/chrome \ - && chmod -R 755 /tmp/chrome; \ - fi - # Copy Install PHP extensions installer ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ From 22d170a4e5ff8118dfe1082a1d1d3382c49efccf Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Fri, 29 Nov 2024 13:40:46 +0100 Subject: [PATCH 05/23] shrink directory configuration --- debian/Dockerfile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 6b21c3d..174cec0 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -9,11 +9,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gnupg2 \ gosu \ supervisor \ - # Packages to be checked + # Unicode support for PDF fonts-noto-cjk \ fonts-noto-cjk-extra \ fonts-wqy-microhei \ fonts-wqy-zenhei \ + # Packages to be checked libonig-dev \ libpng-dev \ libxml2-dev \ @@ -50,20 +51,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Configure directories and permissions for chrome -RUN mkdir -p /var/www/.chrome/chrome-profile \ - mkdir -p /tmp/chrome \ - && chown -R www-data:www-data /var/www/.chrome \ +# Configure directories and permissions +RUN mkdir -p \ + /var/www/.chrome/chrome-profile \ + /tmp/chrome \ && chmod -R 755 /var/www/.chrome \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ - chown root:root /usr/bin/google-chrome \ + chown -R root:root \ + /opt/google/chrome \ + /usr/bin/google-chrome \ && chmod 4755 /usr/bin/google-chrome \ - && chown -R root:root /opt/google/chrome \ - && chmod -R 755 /opt/google/chrome \ - && chown -R www-data:www-data /tmp/chrome \ - && chmod -R 755 /tmp/chrome; \ + && chmod -R 755 \ + /opt/google/chrome \ + /tmp/chrome; \ fi \ - && chown -R www-data:www-data /var/www + && chown -R www-data:www-data \ + /var/www \ + /tmp/chrome # Copy Install PHP extensions installer ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ From 8be252781fcaf01f05910de7682e3cf84caee3d2 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 09:42:29 +0100 Subject: [PATCH 06/23] google-chrome only needs to have ownership for /var/www, which is by default owned by root --- debian/Dockerfile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 174cec0..c4bd349 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -51,23 +51,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Configure directories and permissions -RUN mkdir -p \ - /var/www/.chrome/chrome-profile \ - /tmp/chrome \ - && chmod -R 755 /var/www/.chrome \ - && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ - chown -R root:root \ - /opt/google/chrome \ - /usr/bin/google-chrome \ - && chmod 4755 /usr/bin/google-chrome \ - && chmod -R 755 \ - /opt/google/chrome \ - /tmp/chrome; \ - fi \ - && chown -R www-data:www-data \ - /var/www \ - /tmp/chrome +# # Configure chrome +RUN chown www-data:www-data /var/www \ + && if [ "$(dpkg --print-architecture)" = "arm64" ]; then \ + mkdir -p /var/www/.chrome/chrome-profile \ + && chmod -R 755 /var/www/.chrome; \ + fi # Copy Install PHP extensions installer ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ From 5abd297c7f7ef4b48eb423314de11d7156922c9a Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 09:48:12 +0100 Subject: [PATCH 07/23] switch to user www-data before running tar. tar -o will set correct ownership afterwards. --- debian/Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index c4bd349..a97af2a 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -58,7 +58,7 @@ RUN chown www-data:www-data /var/www \ && chmod -R 755 /var/www/.chrome; \ fi -# Copy Install PHP extensions installer +# Install PHP extensions installer ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ # Install Required PHP extensions. @@ -84,17 +84,18 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" # Copy scripts COPY rootfs / -# Set working directory -WORKDIR /var/www/html +USER www-data # Download and extract application RUN set -eux; \ DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \ - curl -L "$DOWNLOAD_URL" | tar -xvz -C /var/www/html && \ - chown -R www-data:www-data /var/www/html + curl -L "$DOWNLOAD_URL" | tar -oxvz -C /var/www/html -USER www-data +RUN cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html + +# Set working directory +WORKDIR /var/www/html # Install dependencies RUN composer install --no-dev --no-scripts --no-autoloader From 87092bb8bd7204659400b11a18dcfc44beae413d Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 10:27:06 +0100 Subject: [PATCH 08/23] All directories apart of "uploads" exist already --- debian/Dockerfile | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index a97af2a..661eec3 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -113,32 +113,9 @@ COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add initialization script COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh -# Create volume directories -RUN mkdir -p \ - /var/www/html/storage/app/public \ - /var/www/html/storage/framework/cache \ - /var/www/html/storage/framework/sessions \ - /var/www/html/storage/framework/views \ - /var/www/html/storage/logs \ - /var/www/html/public/uploads \ - /var/run \ - /var/log/supervisor - -RUN cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html - -# Set permissions -RUN chown -R www-data:www-data \ - /var/www/html/storage \ - /var/www/html/bootstrap/cache \ - /var/www/html/public/uploads \ - /var/run \ - /var/log/supervisor \ - && chmod -R 775 \ - /var/www/html/public/uploads \ - /var/www/html/storage \ - /var/www/html/bootstrap/cache \ - /var/run \ - /var/log/supervisor +# Create upload directories +RUN mkdir -p /var/www/html/public/uploads \ + && chmod -R 775 /var/www/html/public/uploads # Health check HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \ From e7bc565745d3ca7dfff774cb8b823ec0ad57faec Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 10:39:40 +0100 Subject: [PATCH 09/23] Set correct owner, file and directory permissions. --- debian/scripts/init.sh | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index d0e6da1..93612ad 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -29,22 +29,10 @@ docker_process_init_files() { done } -# Create directories if they don't exist -mkdir -p \ - /var/www/html/storage/app/public \ - /var/www/html/storage/framework/cache \ - /var/www/html/storage/framework/sessions \ - /var/www/html/storage/framework/views \ - /var/www/html/storage/logs \ - /var/www/html/public/storage - -# Set directory permissions without changing ownership -chmod -R 775 \ - /var/www/html/storage \ - /var/www/html/bootstrap/cache \ - /var/www/html/public/storage - -chown -R www-data:www-data /var/www/html/storage +# Ensure owner, file and directory permissions are correct +chown -R www-data:www-data /var/www/html/ +find /var/www/html/ -type f -exec chmod 644 {} \; +find /var/www/html/ -type d -exec chmod 755 {} \; # Clear and cache config in production if [ "$APP_ENV" = "production" ]; then From fab57c9db3d90a41f8fe5e31e33c4ab53091fa76 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 12:11:57 +0100 Subject: [PATCH 10/23] Ensure permissions on volumes are correct mv public directory inside a single RUN to not increase the image --- debian/Dockerfile | 39 ++++++++++++++++----------------------- debian/docker-compose.yml | 4 ++-- debian/scripts/init.sh | 19 ++++++++++++++++--- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 661eec3..b189172 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -58,11 +58,8 @@ RUN chown www-data:www-data /var/www \ && chmod -R 755 /var/www/.chrome; \ fi -# Install PHP extensions installer -ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ - # Install Required PHP extensions. -RUN install-php-extensions \ +RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \ bcmath \ exif \ gd \ @@ -86,24 +83,24 @@ COPY rootfs / USER www-data -# Download and extract application -RUN set -eux; \ - DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ - grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \ - curl -L "$DOWNLOAD_URL" | tar -oxvz -C /var/www/html - -RUN cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html - -# Set working directory WORKDIR /var/www/html -# Install dependencies -RUN composer install --no-dev --no-scripts --no-autoloader - -# Generate optimized autoloader and clear cache -RUN composer dump-autoload --optimize \ +# Setup InvoiceNinja +RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ + grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4 | \ + xargs curl -L | tar -oxvz -C /var/www/html \ + && cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \ + # File permissions + && find /var/www/html/ -type f -exec chmod 644 {} \; \ + # Directory permissions + && find /var/www/html/ -type d -exec chmod 755 {} \; \ + # Install dependencies + && composer install --no-dev --no-scripts --no-autoloader \ + && composer dump-autoload --optimize \ && php artisan optimize \ - && php artisan storage:link + && php artisan storage:link \ + # Workaround for application updates + && mv /var/www/html/public /tmp/public USER root @@ -113,10 +110,6 @@ COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add initialization script COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh -# Create upload directories -RUN mkdir -p /var/www/html/public/uploads \ - && chmod -R 775 /var/www/html/public/uploads - # Health check HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \ CMD php -v || exit 1 diff --git a/debian/docker-compose.yml b/debian/docker-compose.yml index a8cab11..9ad43b3 100644 --- a/debian/docker-compose.yml +++ b/debian/docker-compose.yml @@ -13,13 +13,13 @@ services: env_file: - ./.env volumes: - - ./.env:/var/www/html/.env:ro + - ./.env:/var/www/html/.env - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-php.ini:ro - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/zzz-php-fpm.conf:ro - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro - app_storage:/var/www/html/storage - app_cache:/var/www/html/bootstrap/cache - - image_public:/var/www/html/public:ro + - image_public:/var/www/html/public networks: - app-network depends_on: diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 93612ad..130251b 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -29,10 +29,23 @@ docker_process_init_files() { done } +# Workaround for application updates +rm -rf /var/www/html/public/* +mv /tmp/public/* /var/www/html/public/ + +# Create upload directory +mkdir -p /var/www/html/public/uploads + # Ensure owner, file and directory permissions are correct -chown -R www-data:www-data /var/www/html/ -find /var/www/html/ -type f -exec chmod 644 {} \; -find /var/www/html/ -type d -exec chmod 755 {} \; +chown -R www-data:www-data \ + /var/www/html/storage \ + /var/www/html/public +find /var/www/html/storage \ + /var/www/html/public \ + -type f -exec chmod 644 {} \; +find /var/www/html/storage \ + /var/www/html/public \ + -type d -exec chmod 755 {} \; # Clear and cache config in production if [ "$APP_ENV" = "production" ]; then From 71909c73e00018b205d35133220e67949cd4f57c Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 13:46:58 +0100 Subject: [PATCH 11/23] configure chrome during installation --- debian/Dockerfile | 24 +++++++++---------- .../docker-entrypoint-init.d/10-init-in.sh | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index b189172..990b88d 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -21,10 +21,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ xfonts-wqy \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google.gpg \ + && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | \ + gpg --dearmor -o /etc/apt/keyrings/google.gpg \ && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && apt-get update \ - && apt-get install -y --no-install-recommends google-chrome-stable; \ + && apt-get install -y --no-install-recommends google-chrome-stable \ + && mkdir -p /var/www/.config/google-chrome \ + && chown -R www-data:www-data /var/www/.config/google-chrome; \ elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \ apt-get install -y --no-install-recommends \ # Packages for chrome @@ -46,18 +49,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxfixes3 \ libxkbcommon0 \ libxrandr2 \ - xdg-utils; \ + xdg-utils \ + && mkdir -p /var/www/.chrome/chrome-profile \ + && chown -R www-data:www-data /var/www/.chrome/chrome-profile; \ fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# # Configure chrome -RUN chown www-data:www-data /var/www \ - && if [ "$(dpkg --print-architecture)" = "arm64" ]; then \ - mkdir -p /var/www/.chrome/chrome-profile \ - && chmod -R 755 /var/www/.chrome; \ - fi - # Install Required PHP extensions. RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \ bcmath \ @@ -87,8 +85,10 @@ WORKDIR /var/www/html # Setup InvoiceNinja RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ - grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4 | \ - xargs curl -L | tar -oxvz -C /var/www/html \ + grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \ + cut -d '"' -f 4 | \ + xargs curl -L | \ + tar -oxvz -C /var/www/html \ && cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \ # File permissions && find /var/www/html/ -type f -exec chmod 644 {} \; \ diff --git a/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh b/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh index b744011..6c03b9d 100644 --- a/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh +++ b/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh @@ -11,4 +11,4 @@ if [ ! -z "${IN_PASSWORD}" ]; then password="--password ${IN_PASSWORD}" fi -php artisan ninja:create-account $email $password \ No newline at end of file +php artisan ninja:create-account $email $password From eed358c32bb251c58f3225e2682a5d39a614b38b Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 14:38:48 +0100 Subject: [PATCH 12/23] extended gzip configuration --- debian/nginx/invoiceninja.conf | 24 +++++++++++++++++------- debian/nginx/laravel.conf | 1 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/debian/nginx/invoiceninja.conf b/debian/nginx/invoiceninja.conf index 8e4438c..5b5de16 100644 --- a/debian/nginx/invoiceninja.conf +++ b/debian/nginx/invoiceninja.conf @@ -1,9 +1,19 @@ -client_max_body_size 100M; +# https://nginx.org/en/docs/http/ngx_http_core_module.html client_body_buffer_size 100M; - -fastcgi_buffer_size 16k; -fastcgi_buffers 4 16k; - -gzip on; - +client_max_body_size 100M; server_tokens off; + +# https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html +fastcgi_buffer_size 16k; +fastcgi_buffers 8 16k; + +# https://nginx.org/en/docs/http/ngx_http_gzip_module.html +gzip on; +gzip_comp_level 2; +gzip_min_length 1024; +gzip_proxied any; +gzip_types *; + +#https://nginx.org/en/docs/http/ngx_http_realip_module.html +set_real_ip_from 172.19.0.1; +#real_ip_header X-Real-IP; diff --git a/debian/nginx/laravel.conf b/debian/nginx/laravel.conf index 88ffb39..7404f0c 100644 --- a/debian/nginx/laravel.conf +++ b/debian/nginx/laravel.conf @@ -1,3 +1,4 @@ +# https://laravel.com/docs/master/deployment#nginx server { listen 80 default_server; server_name _; From 067b5eb194014bcb44cf8cfd5be1305256e2a2b6 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 14:53:48 +0100 Subject: [PATCH 13/23] remove value, which matches default --- debian/php/php.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/php/php.ini b/debian/php/php.ini index 12cf380..22e817a 100644 --- a/debian/php/php.ini +++ b/debian/php/php.ini @@ -1,14 +1,14 @@ +# https://www.php.net/manual/en/ini.core.php memory_limit=512M +post_max_size = 60M +upload_max_filesize = 50M +# https://www.php.net/manual/en/opcache.configuration.php opcache.enable=1 opcache.preload=/var/www/html/preload.php opcache.preload_user=www-data opcache.max_accelerated_files=300000 -opcache.validate_timestamps=1 opcache.revalidate_freq=30 opcache.jit_buffer_size=256M opcache.jit=1205 opcache.memory_consumption=1024M - -post_max_size = 60M -upload_max_filesize = 50M From 79647d4f8c8b18aed76c96bd02cd1b45b5c3124f Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Mon, 2 Dec 2024 11:29:40 +0100 Subject: [PATCH 14/23] Fix do not delete public folder on container restart --- debian/scripts/init.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 130251b..939550e 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -30,8 +30,18 @@ docker_process_init_files() { } # Workaround for application updates -rm -rf /var/www/html/public/* -mv /tmp/public/* /var/www/html/public/ +if [ "$(ls -A /tmp/public)" ]; then + echo "Updating public folder..." + rm -rf /var/www/html/public/* \ + /var/www/html/public/.htaccess \ + /var/www/html/public/.well-known + mv /tmp/public/* \ + /tmp/public/.htaccess \ + /tmp/public/.well-known \ + /var/www/html/public/ +else + echo "Public Folder is up to date" +fi # Create upload directory mkdir -p /var/www/html/public/uploads @@ -53,8 +63,6 @@ if [ "$APP_ENV" = "production" ]; then gosu www-data php artisan package:discover gosu www-data php artisan migrate --force - echo "Checking initialization status..." - # If first IN run, it needs to be initialized echo "Checking initialization status..." IN_INIT=$(php artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();') From 66408fccb20b870bbf9f4510a4342e4de31e91a7 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Mon, 2 Dec 2024 11:53:27 +0100 Subject: [PATCH 15/23] align php settings with recommendations opcache/jit from php.net (aligned for php 8.3 and 8.4), increased buffernumber to allow parallel requests without writing to file --- debian/nginx/invoiceninja.conf | 12 +++--------- debian/nginx/laravel.conf | 2 -- debian/php/php.ini | 27 +++++++++++++++------------ 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/debian/nginx/invoiceninja.conf b/debian/nginx/invoiceninja.conf index 5b5de16..e133344 100644 --- a/debian/nginx/invoiceninja.conf +++ b/debian/nginx/invoiceninja.conf @@ -1,19 +1,13 @@ # https://nginx.org/en/docs/http/ngx_http_core_module.html -client_body_buffer_size 100M; -client_max_body_size 100M; +client_max_body_size 10M; server_tokens off; # https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html -fastcgi_buffer_size 16k; -fastcgi_buffers 8 16k; +fastcgi_buffers 32 16K; # https://nginx.org/en/docs/http/ngx_http_gzip_module.html gzip on; gzip_comp_level 2; -gzip_min_length 1024; +gzip_min_length 1M; gzip_proxied any; gzip_types *; - -#https://nginx.org/en/docs/http/ngx_http_realip_module.html -set_real_ip_from 172.19.0.1; -#real_ip_header X-Real-IP; diff --git a/debian/nginx/laravel.conf b/debian/nginx/laravel.conf index 7404f0c..aa02988 100644 --- a/debian/nginx/laravel.conf +++ b/debian/nginx/laravel.conf @@ -24,8 +24,6 @@ server { fastcgi_pass app:9000; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; } location ~ /\.(?!well-known).* { diff --git a/debian/php/php.ini b/debian/php/php.ini index 22e817a..a303dea 100644 --- a/debian/php/php.ini +++ b/debian/php/php.ini @@ -1,14 +1,17 @@ +[core] # https://www.php.net/manual/en/ini.core.php -memory_limit=512M -post_max_size = 60M -upload_max_filesize = 50M +post_max_size = 10M +upload_max_filesize = 10M -# https://www.php.net/manual/en/opcache.configuration.php -opcache.enable=1 -opcache.preload=/var/www/html/preload.php -opcache.preload_user=www-data -opcache.max_accelerated_files=300000 -opcache.revalidate_freq=30 -opcache.jit_buffer_size=256M -opcache.jit=1205 -opcache.memory_consumption=1024M +[opcache] +# https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended +opcache.memory_consumption=128 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=4000 +opcache.revalidate_freq=60 +opcache.enable_cli=1 + +[jit] +# https://wiki.php.net/rfc/jit_config_defaults +opcache.jit=tracing +opcache.jit_buffer_size=64M From 7eaf6968d265ed21a43a45c698dbf80032d65fd1 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Mon, 2 Dec 2024 12:30:17 +0100 Subject: [PATCH 16/23] - fonts-noto-cjk-extra depends on fonts-noto-cjk - *-dev packages are not required - fonts depends on libpng16-16 (no dev) --- debian/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 990b88d..4598daf 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -10,14 +10,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gosu \ supervisor \ # Unicode support for PDF - fonts-noto-cjk \ fonts-noto-cjk-extra \ fonts-wqy-microhei \ fonts-wqy-zenhei \ - # Packages to be checked - libonig-dev \ - libpng-dev \ - libxml2-dev \ xfonts-wqy \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ mkdir -p /etc/apt/keyrings \ From 733e72d5dd892fbdf1fe7dbb779797c986f49585 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Mon, 2 Dec 2024 12:56:24 +0100 Subject: [PATCH 17/23] curl is already installed --- debian/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 4598daf..b153217 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -4,7 +4,6 @@ ARG saxon=12.5.0 # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ - curl \ default-mysql-client \ gnupg2 \ gosu \ From 337f38e0dc1862c369d65381d04671ff98b181b0 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Tue, 3 Dec 2024 10:53:13 +0100 Subject: [PATCH 18/23] remove default values --- debian/php/php.ini | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debian/php/php.ini b/debian/php/php.ini index a303dea..35c9074 100644 --- a/debian/php/php.ini +++ b/debian/php/php.ini @@ -5,11 +5,9 @@ upload_max_filesize = 10M [opcache] # https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended -opcache.memory_consumption=128 -opcache.interned_strings_buffer=8 +opcache.enable_cli=1 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 -opcache.enable_cli=1 [jit] # https://wiki.php.net/rfc/jit_config_defaults From d64ed83abf92d8af455905f8bb1cc97042b62917 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Tue, 3 Dec 2024 23:57:20 +0100 Subject: [PATCH 19/23] temporarly install gpg --- debian/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index b153217..fe59c60 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -5,7 +5,7 @@ ARG saxon=12.5.0 # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ default-mysql-client \ - gnupg2 \ + gpg \ gosu \ supervisor \ # Unicode support for PDF @@ -47,6 +47,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && mkdir -p /var/www/.chrome/chrome-profile \ && chown -R www-data:www-data /var/www/.chrome/chrome-profile; \ fi \ + && apt-get purge -y gpg \ + && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -57,7 +59,8 @@ RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/relea gd \ gmp \ imagick \ - mysqli \ + intl \ + mysqli \ opcache \ pcntl \ pdo_mysql \ From d437dab72cfe63104fe1138e1082dfe5ccf951a9 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Wed, 4 Dec 2024 10:24:10 +0100 Subject: [PATCH 20/23] remove upload folder --- debian/scripts/init.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 939550e..984b6ce 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -43,9 +43,6 @@ else echo "Public Folder is up to date" fi -# Create upload directory -mkdir -p /var/www/html/public/uploads - # Ensure owner, file and directory permissions are correct chown -R www-data:www-data \ /var/www/html/storage \ From 806a340a009aa102330f8850ab9ce1d728791d79 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Thu, 5 Dec 2024 10:34:45 +0100 Subject: [PATCH 21/23] - make it possible to run a custom CMD - rename volume according to their origin - Add arguments for required, suggested and extra php-modules --- debian/Dockerfile | 39 ++++++++++---------- debian/docker-compose.yml | 13 ++++--- debian/scripts/init.sh | 78 +++++++++++++++++++-------------------- 3 files changed, 66 insertions(+), 64 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index fe59c60..22694c3 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,6 +1,9 @@ FROM php:8.3-fpm AS base -ARG saxon=12.5.0 +ARG php_require="bcmath gd pdo_mysql zip" +ARG php_suggest="exif imagick intl pcntl soap" +ARG php_suggest_debian="saxon-12.5.0" +ARG php_extra="opcache" # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -53,22 +56,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Install Required PHP extensions. -RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \ - bcmath \ - exif \ - gd \ - gmp \ - imagick \ - intl \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - redis \ - saxon-${saxon} \ - soap \ - zip \ - @composer +RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ + ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \ + ${php_require} \ + ${php_suggest} \ + ${php_suggest_debian} \ + ${php_extra} \ + @composer; \ + elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \ + ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \ + ${php_require} \ + ${php_suggest} \ + ${php_extra} \ + @composer; \ + fi # Configure PHP RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" @@ -84,8 +85,8 @@ WORKDIR /var/www/html RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \ cut -d '"' -f 4 | \ - xargs curl -L | \ - tar -oxvz -C /var/www/html \ + xargs curl -sL | \ + tar -oxz -C /var/www/html \ && cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \ # File permissions && find /var/www/html/ -type f -exec chmod 644 {} \; \ diff --git a/debian/docker-compose.yml b/debian/docker-compose.yml index 9ad43b3..179ba4d 100644 --- a/debian/docker-compose.yml +++ b/debian/docker-compose.yml @@ -17,9 +17,9 @@ services: - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-php.ini:ro - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/zzz-php-fpm.conf:ro - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro - - app_storage:/var/www/html/storage - app_cache:/var/www/html/bootstrap/cache - - image_public:/var/www/html/public + - app_public:/var/www/html/public + - app_storage:/var/www/html/storage networks: - app-network depends_on: @@ -36,6 +36,7 @@ services: - "80:80" volumes: - ./nginx:/etc/nginx/conf.d:ro + - app_public:/var/www/html/public:ro - app_storage:/var/www/html/storage:ro - image_public:/var/www/html/public:ro networks: @@ -84,13 +85,13 @@ networks: driver: bridge volumes: - app_storage: - driver: local app_cache: driver: local + app_public: + driver: local + app_storage: + driver: local mysql_data: driver: local redis_data: driver: local - image_public: - driver: local diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 984b6ce..40b932b 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -29,52 +29,52 @@ docker_process_init_files() { done } -# Workaround for application updates -if [ "$(ls -A /tmp/public)" ]; then - echo "Updating public folder..." - rm -rf /var/www/html/public/* \ - /var/www/html/public/.htaccess \ - /var/www/html/public/.well-known - mv /tmp/public/* \ - /tmp/public/.htaccess \ - /tmp/public/.well-known \ - /var/www/html/public/ -else +if [ "$*" = 'supervisord -n -c /etc/supervisor/conf.d/supervisord.conf' ]; then + # Workaround for application updates + if [ "$(ls -A /tmp/public)" ]; then + echo "Updating public folder..." + rm -rf /var/www/html/public/.htaccess \ + /var/www/html/public/.well-known \ + /var/www/html/public/* + mv /tmp/public/* \ + /tmp/public/.htaccess \ + /tmp/public/.well-known \ + /var/www/html/public/ + fi echo "Public Folder is up to date" -fi -# Ensure owner, file and directory permissions are correct -chown -R www-data:www-data \ - /var/www/html/storage \ - /var/www/html/public -find /var/www/html/storage \ - /var/www/html/public \ + # Ensure owner, file and directory permissions are correct + chown -R www-data:www-data \ + /var/www/html/public \ + /var/www/html/storage + find /var/www/html/public \ + /var/www/html/storage \ -type f -exec chmod 644 {} \; -find /var/www/html/storage \ - /var/www/html/public \ + find /var/www/html/public \ + /var/www/html/storage \ -type d -exec chmod 755 {} \; -# Clear and cache config in production -if [ "$APP_ENV" = "production" ]; then - gosu www-data php artisan optimize - gosu www-data php artisan package:discover - gosu www-data php artisan migrate --force + # Clear and cache config in production + if [ "$APP_ENV" = "production" ]; then + gosu www-data php artisan optimize + gosu www-data php artisan package:discover + gosu www-data php artisan migrate --force - # If first IN run, it needs to be initialized - echo "Checking initialization status..." - IN_INIT=$(php artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();') - echo "IN_INIT value: $IN_INIT" + # If first IN run, it needs to be initialized + echo "Checking initialization status..." + IN_INIT=$(php artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();') + echo "IN_INIT value: $IN_INIT" + + if [ "$IN_INIT" = "1" ]; then + echo "Running initialization scripts..." + docker_process_init_files /docker-entrypoint-init.d/* + fi + + echo "Production setup completed" + echo "IN_INIT value: $IN_INIT" - if [ "$IN_INIT" = "1" ]; then - echo "Running initialization scripts..." - docker_process_init_files /docker-entrypoint-init.d/* fi - echo "Production setup completed" - echo "IN_INIT value: $IN_INIT" - + echo "Starting supervisord..." fi - -echo "Starting supervisord..." -# Start supervisord in the foreground -exec /usr/bin/supervisord -n -c /etc/supervisor/conf.d/supervisord.conf +exec "$@" From 0ace4275859ed571cfa4fb0753058ccf28ba73cd Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Thu, 5 Dec 2024 13:35:32 +0100 Subject: [PATCH 22/23] - supervisord.conf defines nodaemon already - Fix if statement --- debian/scripts/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 40b932b..96c7998 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -29,7 +29,7 @@ docker_process_init_files() { done } -if [ "$*" = 'supervisord -n -c /etc/supervisor/conf.d/supervisord.conf' ]; then +if [ "$*" = 'supervisord -c /etc/supervisor/conf.d/supervisord.conf' ]; then # Workaround for application updates if [ "$(ls -A /tmp/public)" ]; then echo "Updating public folder..." From d538666600ba7bfe5619c0002dbddf824ba9c124 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Thu, 5 Dec 2024 13:47:42 +0100 Subject: [PATCH 23/23] final fix for if statement --- debian/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 22694c3..c55687b 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -115,4 +115,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \ EXPOSE 9000 ENTRYPOINT ["/usr/local/bin/init.sh"] -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] +CMD ["supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]