From 8025bf269243fe5c9a13491f46f45aae3aa154dd Mon Sep 17 00:00:00 2001 From: Konstantinos Arvanitakis Date: Mon, 28 Sep 2026 20:38:46 +0300 Subject: [PATCH] Feat: Adding vendor publish for nginx to be able to grab them --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b2598b..5b501a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,14 +94,14 @@ COPY . . RUN chown -R www-data:www-data storage bootstrap/cache \ && chmod -R 775 storage bootstrap/cache -# No package:discover/vendor:publish/filament:assets here. Asset-publish -# output (public/vendor/*, etc.) is generated locally and committed, so -# `COPY . .` above already ships it. package:discover would only pre-warm -# bootstrap/cache/packages.php — Laravel discovers providers live from -# vendor/composer/installed.json on first boot if that cache is absent, so -# it's not required — and some provider queries the DB during discovery, -# which this build stage has no connection for (no .env in the build -# context), so running it here would need a database that doesn't exist yet. +# Publishes into THIS stage's public/ so nginx's own build stage below +# (COPY --from=production /var/www/html/public ...) picks them up too — +# nginx has no shared volume with app, so its public/ is otherwise frozen +# at whatever was last baked into its image. +RUN php artisan vendor:publish --tag=core-assets --force --ansi \ + && php artisan vendor:publish --tag=public --force --ansi \ + && php artisan filament:assets --ansi + COPY docker/entrypoint.sh /entrypoint.sh COPY docker/entrypoint-worker.sh /entrypoint-worker.sh RUN chmod +x /entrypoint.sh /entrypoint-worker.sh