diff --git a/.dockerignore b/.dockerignore index 08b72ac7..de67b71b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,3 +20,7 @@ public/modules/* .qodo .camel-jbang +# Ignore large archives that slow down docker build context +*.zip +*.tar.gz +*.sql diff --git a/Dockerfile b/Dockerfile index f6e23061..55c1d7d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,8 +46,14 @@ RUN mkdir -p storage/framework/cache \ && chmod -R 777 storage \ && chmod -R 777 bootstrap/cache +# Configure Composer for stability on unstable networks +ENV COMPOSER_ALLOW_SUPERUSER=1 \ + COMPOSER_MEMORY_LIMIT=-1 \ + COMPOSER_PROCESS_TIMEOUT=2000 + # Install PHP dependencies (this layer will be cached) -RUN composer install --no-interaction --no-progress --no-scripts +RUN composer config -g repo.packagist composer https://packagist.org \ + && composer install --no-interaction --no-progress --no-scripts --prefer-dist # Isolate the clean vendor directory #RUN mv vendor /vendor_clean diff --git a/build.log b/build.log new file mode 100644 index 00000000..878ecb09 --- /dev/null +++ b/build.log @@ -0,0 +1,253 @@ +#0 building with "default" instance using docker driver + +#1 [internal] load build definition from Dockerfile +#1 transferring dockerfile: 2.31kB done +#1 DONE 0.0s + +#2 [internal] load metadata for docker.io/library/php:8.2-fpm-alpine +#2 ... + +#3 [internal] load metadata for docker.io/library/composer:latest +#3 DONE 6.0s + +#2 [internal] load metadata for docker.io/library/php:8.2-fpm-alpine +#2 DONE 6.6s + +#4 [internal] load .dockerignore +#4 transferring context: 412B done +#4 DONE 0.0s + +#5 [stage-0 1/17] FROM docker.io/library/php:8.2-fpm-alpine@sha256:6363baa3186e5bd43794c9612f8a34fb88657179de3da3ebc37b8618ba7bfffc +#5 DONE 0.0s + +#6 FROM docker.io/library/composer:latest@sha256:743aebe48ca67097c36819040633ea77e44a561eca135e4fc84c002e63a1ba07 +#6 DONE 0.0s + +#7 [internal] load build context +#7 transferring context: 357.31kB 0.1s done +#7 DONE 0.1s + +#8 [stage-0 3/17] RUN git config --global --add safe.directory /var/www/html +#8 CACHED + +#9 [stage-0 4/17] COPY --from=composer:latest /usr/bin/composer /usr/bin/composer +#9 CACHED + +#10 [stage-0 5/17] WORKDIR /var/www/html +#10 CACHED + +#11 [stage-0 6/17] COPY composer.json composer.lock ./ +#11 CACHED + +#12 [stage-0 2/17] RUN apk add --no-cache vim xxd libzip-dev postgresql-dev libpng-dev libjpeg-turbo-dev freetype-dev oniguruma-dev git curl nodejs npm && docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install -j$(nproc) pdo_pgsql pgsql opcache zip bcmath gd exif pcntl +#12 CACHED + +#13 [stage-0 7/17] RUN mkdir -p storage/framework/cache && mkdir -p storage/framework/sessions && mkdir -p storage/framework/views && mkdir -p storage/framework/testing && mkdir -p storage/logs && mkdir -p bootstrap/cache && chmod -R 777 storage && chmod -R 777 bootstrap/cache +#13 CACHED + +#14 [stage-0 8/17] RUN composer install --no-interaction --no-progress --no-scripts +#14 0.298 Installing dependencies from lock file (including require-dev) +#14 0.303 Verifying lock file contents can be installed on current platform. +#14 0.325 Package operations: 202 installs, 0 updates, 0 removals +#14 0.343 - Downloading php-http/discovery (1.20.0) +#14 0.343 - Downloading spatie/color (1.8.0) +#14 0.344 - Downloading voku/portable-ascii (2.0.3) +#14 0.344 - Downloading symfony/polyfill-php80 (v1.33.0) +#14 0.344 - Downloading symfony/polyfill-mbstring (v1.33.0) +#14 0.344 - Downloading symfony/polyfill-ctype (v1.33.0) +#14 0.344 - Downloading phpoption/phpoption (1.9.5) +#14 0.344 - Downloading graham-campbell/result-type (v1.1.4) +#14 0.344 - Downloading vlucas/phpdotenv (v5.6.3) +#14 0.344 - Downloading symfony/css-selector (v7.4.0) +#14 0.345 - Downloading tijsverkoyen/css-to-inline-styles (v2.4.0) +#14 0.345 - Downloading symfony/deprecation-contracts (v3.6.0) +#14 0.345 - Downloading symfony/var-dumper (v6.4.26) +#14 0.345 - Downloading symfony/polyfill-uuid (v1.33.0) +#14 0.345 - Downloading symfony/uid (v6.4.24) +#14 0.345 - Downloading symfony/routing (v6.4.30) +#14 0.345 - Downloading symfony/process (v6.4.31) +#14 0.345 - Downloading symfony/polyfill-intl-normalizer (v1.33.0) +#14 0.345 - Downloading symfony/polyfill-intl-idn (v1.33.0) +#14 0.345 - Downloading symfony/mime (v6.4.30) +#14 0.346 - Downloading psr/container (2.0.2) +#14 0.346 - Downloading symfony/service-contracts (v3.6.1) +#14 0.346 - Downloading psr/event-dispatcher (1.0.0) +#14 0.346 - Downloading symfony/event-dispatcher-contracts (v3.6.0) +#14 0.346 - Downloading symfony/event-dispatcher (v7.4.0) +#14 0.346 - Downloading psr/log (3.0.2) +#14 0.346 - Downloading doctrine/deprecations (1.1.5) +#14 0.346 - Downloading doctrine/lexer (2.1.1) +#14 0.346 - Downloading egulias/email-validator (4.0.4) +#14 0.346 - Downloading symfony/mailer (v6.4.31) +#14 0.346 - Downloading symfony/polyfill-php83 (v1.33.0) +#14 0.346 - Downloading symfony/http-foundation (v6.4.31) +#14 0.346 - Downloading symfony/error-handler (v6.4.26) +#14 0.346 - Downloading symfony/http-kernel (v6.4.31) +#14 0.347 - Downloading symfony/finder (v6.4.31) +#14 0.347 - Downloading symfony/polyfill-intl-grapheme (v1.33.0) +#14 0.347 - Downloading symfony/string (v7.4.0) +#14 0.347 - Downloading symfony/console (v6.4.31) +#14 0.347 - Downloading ramsey/collection (2.1.1) +#14 0.347 - Downloading brick/math (0.12.3) +#14 0.347 - Downloading ramsey/uuid (4.9.2) +#14 0.347 - Downloading psr/simple-cache (3.0.0) +#14 0.347 - Downloading nunomaduro/termwind (v1.17.0) +#14 0.347 - Downloading symfony/translation-contracts (v3.6.1) +#14 0.347 - Downloading symfony/translation (v6.4.31) +#14 0.347 - Downloading psr/clock (1.0.0) +#14 0.347 - Downloading carbonphp/carbon-doctrine-types (2.1.0) +#14 0.348 - Downloading nesbot/carbon (2.73.0) +#14 0.348 - Downloading monolog/monolog (3.10.0) +#14 0.348 - Downloading league/mime-type-detection (1.16.0) +#14 0.348 - Downloading league/flysystem (3.30.2) +#14 0.348 - Downloading league/flysystem-local (3.30.2) +#14 0.348 - Downloading nette/utils (v4.1.1) +#14 0.348 - Downloading nette/schema (v1.3.3) +#14 0.348 - Downloading dflydev/dot-access-data (v3.0.3) +#14 0.348 - Downloading league/config (v1.2.0) +#14 0.348 - Downloading league/commonmark (2.8.0) +#14 0.348 - Downloading laravel/serializable-closure (v1.3.7) +#14 0.348 - Downloading laravel/framework (v10.50.0) +#14 0.349 - Downloading laravel/prompts (v0.1.25) +#14 0.349 - Downloading guzzlehttp/uri-template (v1.0.5) +#14 0.349 - Downloading fruitcake/php-cors (v1.4.0) +#14 0.349 - Downloading dragonmantank/cron-expression (v3.6.0) +#14 0.349 - Downloading doctrine/inflector (2.1.0) +#14 0.349 - Downloading ageekdev/laravel-barcode (v1.3.0) +#14 0.349 - Downloading anandsiddharth/laravel-paytm-wallet (v2.0.0) +#14 0.349 - Downloading symfony/filesystem (v7.4.0) +#14 0.349 - Downloading psr/http-message (2.0) +#14 0.349 - Downloading mtdowling/jmespath.php (2.8.0) +#14 0.349 - Downloading ralouphie/getallheaders (3.0.3) +#14 0.349 - Downloading psr/http-factory (1.1.0) +#14 0.349 - Downloading guzzlehttp/psr7 (2.8.0) +#14 0.350 - Downloading guzzlehttp/promises (2.3.0) +#14 0.350 - Downloading psr/http-client (1.0.3) +#14 0.350 - Downloading guzzlehttp/guzzle (7.10.0) +#14 0.350 - Downloading aws/aws-crt-php (v1.2.7) +#14 0.350 - Downloading aws/aws-sdk-php (3.369.10) +#14 0.350 - Downloading masterminds/html5 (2.10.0) +#14 0.350 - Downloading thecodingmachine/safe (v3.3.0) +#14 0.350 - Downloading sabberworm/php-css-parser (v9.1.0) +#14 0.350 - Downloading dompdf/php-svg-lib (1.0.2) +#14 0.350 - Downloading dompdf/php-font-lib (1.0.1) +#14 0.350 - Downloading dompdf/dompdf (v3.1.4) +#14 0.350 - Downloading barryvdh/laravel-dompdf (v3.1.1) +#14 0.351 - Downloading dasprid/enum (1.0.7) +#14 0.351 - Downloading dipesh79/laravel-phonepe (1.0.1) +#14 0.351 - Downloading psr/cache (3.0.0) +#14 0.351 - Downloading doctrine/event-manager (2.0.1) +#14 0.351 - Downloading doctrine/persistence (4.1.1) +#14 0.351 - Downloading fakerphp/faker (v1.24.1) +#14 0.351 - Downloading fedapay/fedapay-php (0.4.7) +#14 0.351 - Downloading rize/uri-template (0.4.1) +#14 0.351 - Downloading grpc/grpc (1.74.0) +#14 0.351 - Downloading google/protobuf (v4.33.3) +#14 0.351 - Downloading google/longrunning (0.6.0) +#14 0.351 - Downloading firebase/php-jwt (v6.11.1) +#14 0.352 - Downloading google/auth (v1.50.0) +#14 0.352 - Downloading google/grpc-gcp (v0.4.1) +#14 0.352 - Downloading google/common-protos (4.12.4) +#14 0.352 - Downloading google/gax (v1.40.0) +#14 0.352 - Downloading google/cloud-core (v1.69.0) +#14 0.352 - Downloading hardevine/shoppingcart (3.4) +#14 0.352 - Downloading karim007/laravel-bkash-tokenize (v2.4) +#14 0.352 - Downloading kavenegar/php (v1.2.2) +#14 0.352 - Downloading lcobucci/jwt (5.6.0) +#14 0.352 - Downloading fig/http-message-util (1.1.5) +#14 0.352 - Downloading beste/clock (3.0.0) +#14 0.352 - Downloading kreait/firebase-tokens (5.3.0) +#14 0.353 - Downloading google/cloud-storage (v1.49.0) +#14 0.353 - Downloading cuyz/valinor (2.3.1) +#14 0.353 - Downloading beste/json (1.7.0) +#14 0.353 - Downloading beste/in-memory-cache (1.4.0) +#14 0.353 - Downloading kreait/firebase-php (7.24.0) +#14 0.353 - Downloading laravel/breeze (v1.29.1) +#14 0.353 - Downloading laravel/pint (v1.27.0) +#14 0.353 - Downloading symfony/yaml (v7.4.1) +#14 0.353 - Downloading laravel/sail (v1.52.0) +#14 0.353 - Downloading laravel/sanctum (v3.3.3) +#14 0.353 - Downloading paragonie/random_compat (v9.99.100) +#14 0.353 - Downloading paragonie/constant_time_encoding (v3.1.3) +#14 0.353 - Downloading phpseclib/phpseclib (3.0.48) +#14 0.354 - Downloading league/oauth1-client (v1.11.0) +#14 0.354 - Downloading laravel/socialite (v5.24.1) +#14 0.354 - Downloading nikic/php-parser (v5.7.0) +#14 0.354 - Downloading psy/psysh (v0.12.18) +#14 0.354 - Downloading laravel/tinker (v2.11.0) +#14 0.354 - Downloading php-http/promise (1.3.1) +#14 0.354 - Downloading php-http/httplug (2.4.1) +#14 0.354 - Downloading php-http/guzzle7-adapter (1.1.0) +#14 0.354 - Downloading php-http/message-factory (1.1.0) +#14 0.354 - Downloading clue/stream-filter (v1.7.0) +#14 0.354 - Downloading php-http/message (1.16.2) +#14 0.354 - Downloading moneyphp/money (v4.8.0) +#14 0.355 - Downloading omnipay/common (v3.4.0) +#14 0.355 - Downloading markbaker/matrix (3.0.1) +#14 0.355 - Downloading markbaker/complex (3.0.2) +#14 0.355 - Downloading maennchen/zipstream-php (3.1.2) +#14 0.355 - Downloading ezyang/htmlpurifier (v4.19.0) +#14 0.355 - Downloading composer/pcre (3.3.2) +#14 0.355 - Downloading phpoffice/phpspreadsheet (1.30.0) +#14 0.355 - Downloading composer/semver (3.4.4) +#14 0.355 - Downloading maatwebsite/excel (3.1.67) +#14 0.356 - Downloading mediaburst/clockworksms (2.0.0) +#14 0.356 - Downloading melipayamak/php (1.0.0) +#14 0.356 - Downloading doctrine/common (3.5.0) +#14 0.356 - Downloading doctrine/annotations (1.14.4) +#14 0.356 - Downloading mercadopago/dx-php (2.6.2) +#14 0.356 - Downloading hamcrest/hamcrest-php (v2.1.1) +#14 0.356 - Downloading mockery/mockery (1.6.12) +#14 0.356 - Downloading composer/ca-bundle (1.5.10) +#14 0.356 - Downloading mollie/mollie-api-php (v2.79.1) +#14 0.356 - Downloading setasign/fpdi (v2.6.4) +#14 0.356 - Downloading myclabs/deep-copy (1.13.4) +#14 0.357 - Downloading mpdf/psr-log-aware-trait (v3.0.0) +#14 0.357 - Downloading mpdf/psr-http-message-shim (v2.0.1) +#14 0.357 - Downloading mpdf/mpdf (v8.2.7) +#14 0.357 - Downloading filp/whoops (2.18.4) +#14 0.357 - Downloading nunomaduro/collision (v7.12.0) +#14 0.357 - Downloading nwidart/laravel-modules (10.0.6) +#14 0.357 - Downloading omnipay/paypal (v3.0.2) +#14 0.357 - Downloading omnipay/stripe (v3.2.0) +#14 0.357 - Downloading paytm/paytmchecksum (v1.1.0) +#14 0.357 - Downloading sebastian/version (4.0.1) +#14 0.357 - Downloading sebastian/type (4.0.0) +#14 0.357 - Downloading sebastian/recursion-context (5.0.1) +#14 0.358 - Downloading sebastian/object-reflector (3.0.0) +#14 0.358 - Downloading sebastian/object-enumerator (5.0.0) +#14 0.358 - Downloading sebastian/global-state (6.0.2) +#14 0.358 - Downloading sebastian/exporter (5.1.4) +#14 0.358 - Downloading sebastian/environment (6.1.0) +#14 0.358 - Downloading sebastian/diff (5.1.1) +#14 0.358 - Downloading sebastian/comparator (5.0.4) +#14 0.358 - Downloading sebastian/code-unit (2.0.0) +#14 0.358 - Downloading sebastian/cli-parser (2.0.1) +#14 0.358 - Downloading phpunit/php-timer (6.0.0) +#14 0.358 - Downloading phpunit/php-text-template (3.0.1) +#14 0.358 - Downloading phpunit/php-invoker (4.0.0) +#14 0.358 - Downloading phpunit/php-file-iterator (4.1.0) +#14 0.358 - Downloading theseer/tokenizer (1.3.1) +#14 0.359 - Downloading sebastian/lines-of-code (2.0.2) +#14 0.359 - Downloading sebastian/complexity (3.2.0) +#14 0.359 - Downloading sebastian/code-unit-reverse-lookup (3.0.0) +#14 0.359 - Downloading phpunit/php-code-coverage (10.1.16) +#14 0.359 - Downloading phar-io/version (3.2.1) +#14 0.359 - Downloading phar-io/manifest (2.0.4) +#14 0.359 - Downloading phpunit/phpunit (10.5.60) +#14 0.359 - Downloading rmccue/requests (v2.0.17) +#14 0.359 - Downloading razorpay/razorpay (2.9.2) +#14 0.359 - Downloading safiull/laravel-installer (3.5.2) +#14 0.359 - Downloading bacon/bacon-qr-code (2.0.8) +#14 0.359 - Downloading simplesoftwareio/simple-qrcode (4.2.0) +#14 0.360 - Downloading smsgatewayme/client (v0.0.1) +#14 0.360 - Downloading spatie/error-solutions (1.1.3) +#14 0.360 - Downloading spatie/backtrace (1.8.1) +#14 0.360 - Downloading spatie/flare-client-php (1.10.1) +#14 0.360 - Downloading spatie/ignition (1.15.1) +#14 0.360 - Downloading spatie/laravel-ignition (2.9.1) +#14 0.360 - Downloading spatie/laravel-permission (6.24.0) +#14 0.360 - Downloading stripe/stripe-php (v13.18.0) +#14 0.360 - Downloading twilio/sdk (8.10.1) +#14 0.360 - Downloading tzsk/sms (9.0.0) +#14 10.38 A connection timeout was encountered. If you intend to run Composer without connecting to the internet, run the command again prefixed with COMPOSER_DISABLE_NETWORK=1 to make Composer run in offline mode. diff --git a/entrypoint.sh b/entrypoint.sh index b5868c3a..7afb57f6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -77,7 +77,13 @@ grep "APP_KEY" .env # Ensure vendor directory matches composer.lock exactly, syncing missing packages echo "Verifying and synchronizing Composer dependencies..." -composer install # --no-interaction --optimize-autoloader +# Run composer install to physically ensure all files (like laravel/prompts) are present in the volume +composer install --no-interaction --optimize-autoloader + +# FIX: Ensure all generated/downloaded files are fully readable and executable by PHP-FPM +echo "Setting correct ownership for web server..." +chown -R www-data:www-data vendor +chmod -R 755 vendor # Verify vendor integrity at PHP level echo "Checking vendor visibility and READABILITY for PHP..."